Run yum update to install the latest versions of TigerVNC and the GUI itself.Black screen with the mouse - updating YUM or reinstalling the GUI: if you see a black screen with a working mouse cursor, it probably means that your VNC connection is working fine, but there is something that prevents the GUI from starting correctly desktop. Connection problems - Firewall configuration: if you see pop-up errors that the client cannot connect to the remote host, you need to check your network and firewall configuration to make sure there are no blocking problems that could prevent the client from connecting to TCP server port 5901.Ģ. If your client cannot establish a working VNC connection, you need to check the following:ġ. Remember to specify TCP port 5901 (if you followed our guide). Now that everything is set up, we can try to connect to our VNC service using a VNC client, such as TightVNC, UltraVNC or RealVNC, and see what happens. Vncserver -kill $DISPLAY VNC client connection To do this, edit the file /home//.vnc/xstartup and change the exec entry (usually line 4) from etc/X11/xinit/xinitrc to startxfce4, as shown below: If you decide to use Xfce, you will also need to modify the file that was executed when the VNC session started. $ yum groupinstall xfce Additional settings for Xfce GNOME also works great, but it quite resources intensive: if you want to save resources on your server machine, Xfce might be the best choice. If you need a lightweight alternative, we can offer Xfce, a free, open-source environment for Unix-like platforms that works great with TigerVNC. $ sudo yum groupinstall "GNOME Desktop" Xfce
If you want a great, but heavyweight GNOME interface, enter the following: Otherwise, you need to install one of them: the TigerVNC server will start a parallel instance of this desktop environment for each login session, which means that we must have at least one GUI. If you already have GNOME, KDE, or other installed desktop environments, you can skip this step. Installing the graphical user interface (GUI) It will not be superfluous to mention that you can also restrict this port to certain groups, IP addresses, network cards, or other simple or complex firewall rules. # firewall-cmd -add-port = 5901 / tcp -permanent The command to open this port on Firewalld: In our scenario, we did only 1, so you only need to open the first dedicated VNC port: TCP 5901, as we already said. How many ports to open will depend on how many VNC server instances you need. Therefore, if you have a firewall installed, you must create an appropriate rule that allows VNC clients to connect. Since our VNC service is listening on TCP port 5901, you must be sure that such a port is open and accessible to external clients. If you see this, then everything is set up correctly. Installing TigerVNCĪnother test that you can perform before trying to connect to the server is to look at the active network sockets using the sscommand: if everything works correctly, you should see that the VNC server is working and uses TCP port 5901. That's why we choose TigerVNC, which runs parallel sessions of the desktop environment of the computer (GNOME, KDE, or another GUI): this means that a virtual desktop will be created for each connection - this is exactly what we want. The latter, perhaps more powerful and secure, especially if you need to manage the server computer because each session will be a unique environment, configured with the permissions and rights of the connected user.
The software was developed by the Olivetti & Oracle research lab in Cambridge, UK, and its source code is still up to date and available under the General Public License (GNU).ĭepending on the server software, the VNC client will connect to the active desktop (for example, as TeamViewer or AnyDesk programs) or a standalone virtual desktop (like the Windows RDP remote desktop protocol). VNC (Virtual Network Computing) is a client-server protocol that allows a client computer (running a VNC client) to connect and control a remote computer (running on a VNC server).
In particular, we will do this using the TigerVNC Server software, a free tool that allows using a stand-alone virtual desktop.
In this guide, we will look at how to install and configure a VNC server on the CentOS 7.x operating system to allow remote connections from any VNC clients, such as TightVNC, RealVNC, and others.