How To Install VNC Server on CentOS 8

Install VNC Server on CentOS 8

In this tutorial we will show you how to install VNC Server on CentOS 8. For those of you who didn’t know, Virtual Network Computing (VNC) is a graphical desktop sharing system that allows you to use your keyboard and mouse to remotely control another computer. VNC servers are not installed by default and need to be installed manually.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation VNC on a CentOS 8 server.

Install VNC Server on CentOS 8

Step 1. First, let’s start by ensuring your system is up-to-date.

Step 2. Installing Desktop Environment.

Run the following command to install Gnome desktop environment;

Step 3. Installing VNC Server on CentOS 8.

We will install the TigerVNC server, It is available in the default CentOS repositories, to install it type:

Once installed, run the vncserver command to create the initial configuration and set up the password:

Before continuing with the next step, first stop the VNC instance using the vncserver command with a -kill option and the server number as an argument:

Step 4. Configuring VNC Server.

The next step is to configure TigerVNC to use Gnome. The VNC server uses the ~/.vnc/xstartup file to launch applications when creating a new desktop:

Edit it as follows:

Step 5. Creating a Systemd unit file.

Now will creating a Systemd unit file:

Next, copy the default vncserver unit file:

Notify systemd that a new user unit file exist:

Step 6. Accessing to VNC server.

Now you can able to connect VNC server using IP and Port ( Example : 192.168.2.109:5 ) and you will be asked to enter the password, enter the password that you have created earlier.

Install VNC Server on CentOS 8

Install VNC Server on CentOS 8

If you run Linux, macOS, or any other Unix-based operating system on your machine, you can easily create a tunnel using the following ssh command:

Congratulation’s! You have successfully installed VNC Server. Thanks for using this tutorial for installing VNC on CentOS 8 system. For additional help or useful information, we recommend you to check the official VNC website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!