


Now we are all set to see if the remote desktop connection is working. ~]# Step 6) Connect to Remote Desktop Session Use the following command allow VNC Server port “5901” in os firewall, ~]# firewall-cmd -permanent -add-port=5901/tcp Use below systemctl command to verify the status of VNC server, ~]# systemctl status command’s output confirms that VNC is started successfully on port tcp port 5901. Use below netstat or ss command to verify whether VNC server start listening its request on 5901, ~]# netstat -tunlp | grep 5901 ~]# systemctl start ~]# systemctl enable symlink → /etc/systemd/system/. I am using display number as 1, so use the following commands to start and enable vnc service on display number “1”, ~]# systemctl daemon-reload Step 5) Start VNC Service and allow port in firewall Note:Replace the user name in above file which suits to your setup.īy default, VNC server listen on tcp port 5900+n, where n is the display number, if the display number is “1” then VNC server will listen its request on TCP port 5901. ~]# vim /etc/systemd/system/ ĮxecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'ĮxecStart=/sbin/runuser -l pkumar -c "/usr/bin/vncserver %i -geometry 1280x1024"ĮxecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' Create a file “ /etc/systemd/system/ ” with the following content so that tigervnc-server’s service started for above local user “pkumar”. Next step is to configure VNC Server Configuration file. ~]# Step 4) Setup VNC Server Configuration File
Realvnc status password#
Would you like to enter a view-only password (y/n)? n Let’s assume we want ‘pkumar’ user to use VNC for remote desktop session, then switch to the user and set its password using vncpasswd command, ~]# su - pkumar

Realvnc status install#
Now install TigerVNC Server using the following command: ~]# dnf install tigervnc-server tigervnc-server-module -y Step 3) Set VNC Password for Local User It is one of the most popular VNC Server and a high-performance and platform-independent VNC that allows users to interact with remote machines easily. Next we’ll install the VNC Server, there are lot of VNC Servers available, and for installation purposes, we’ll be installing TigerVNC Server. ~]# sed -i -follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux Step 2) Install VNC Server (tigervnc-server) VNC server will not work properly if SElinux is enabled on your system, as of now work around is to disable it using following commands, ~]# setenforce 0 Note: Wayland is the default display manager (GDM) in GNOME and it not is configured to handled remote rendering API like X.org Once the system is rebooted successfully uncomment the line “ WaylandEnable=false” from the file “ /etc/gdm/nf” so that remote desktop session request via vnc is handled by xorg of GNOME desktop in place of wayland display manager. Now reboot the system so that we get GNOME login screen. Once the above packages are installed successfully then run the following command to enable the graphical mode ~]# systemctl set-default graphical if you don’t have it in your system, install it using the following command: ~]# dnf groupinstall "workstation" In CentOS 8 / RHEL 8, GNOME is the default desktop environment.
