Install and Configure vnc server on CentOS 7 Step-by-Step Tutorial: Install and Configure vnc server in RHEL 8 Linux #Tigervnc arch linux windows# We recommend to use yum for installing the rpms, or else if you do not have an active internet connection then you can always use your CentOS/RHEL DVD to get the packages and perform the installation. # yum -y install tigervnc tigervnc-server Since for us we have an active internet connection we will use yum to install the rpms to install and configure vnc server on CentOS 7. To start with the steps to install and configure vnc server on CentOS 7, we would need a configuration file. For this we will copy the default configuration file to below location with two different display number # cp 1.service By default we will get a sample configuration file from tigervnc-server rpm as shown below # rpm -ql this example we will create vncservice for root and a normal user deepak. The steps to configure vnc server has changed in RHEL 7.8 and higher releases. If you are using CentOS then the minor version may vary so look out for the sample configuration file in the below methods and choose the one matching your sample configuration file. I have this service unit file from tigervnc-server-1.8.86_64 version of rpm. # Clean any existing files in /tmp/.X11-unix environmentĮxecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'ĮxecStart=/usr/sbin/runuser -l root -c "/usr/bin/vncserver %i"ĮxecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' In this example the user will be root # vim /etc/systemd/system/ desktop service (VNC) Edit the file with text editor and replace the string USER with appropriate vncuser’s username. To make the changes take effect immediately, issue the following command: # systemctl daemon-reload home/deepak/.vnc/%H%i.pid, if the home path of the user is /export/home then the path should be /export/home/deepak/.vnc/%H%i.pid Make sure to change the path for PIDFile with the home path of the user i.e. In this method we don't have any special handling for root and normal user to be able to use vnc server. I have this unit file with tigervnc-server-1.8.86_64 version rpm from CentOS 7.7. Below is a sample unit file for vncserver service. Here replace with the username for which you wish to configure vnc server. ĮxecStart=/usr/bin/vncserver_wrapper deepak %i In this example I have replaced with deepak. Here changing the path in PIDFile line to /root/.vnc/%H%i.pid is not required. Aside from the replacement, do not replace the rest of the unit text. Next to activate the changes reload the systemd daemon. Set the password for the user or users defined in the configuration file.
0 Comments
Leave a Reply. |