In this tutorial we will show you how to install VNC Server on Ubuntu 18.04 LTS. For those of you who didn’t know, VNC (Virtual Network Computing) server is a free and open source software which is designed for allowing remote access to the Desktop Environment of the server to the VNC Client whereas VNC viewer is used on remote computer to connect to the server .
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 Server on an Ubuntu 18.04 Bionic Beaver server.
Install VNC Server on Ubuntu 18.04 LTS Bionic Beaver
Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.
Step 2. Installing VNC Server on Ubuntu 18.04 LTS.
First, type the following command to install Xfce on your server:
Next, install TigerVNC on your Ubuntu server:
Once installed the next step is to run the vncserver command which will create the initial configuration and set up the password:
After VNC Server started and created some of it’s files. We are now can turn it off to modify the xstartup file (startup script) to make it start with xfce4:
First, create the following file:
Add following files:
Next, Run the following command to make sure permissions are correct:
The next step is to create VNC Server statup script:
Add following files:
ExecStartPre=/bin/sh-c'/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :'
The next step is to enable the unit file with the following command:
To access remote desktop on vnc server from windows system, you must have vnc viewer installed on your system. There are various vnc viewer available to use. Download any one and install on your system, for example:
Congratulation’s! You have successfully installed VNC Server. Thanks for using this tutorial for installing VNC Server on your Ubuntu 18.04 LTS Bionic Beaver. For additional help or useful information, we recommend you to check the official VNC web site.