How to Install VNC on Ubuntu 16.04

September 26, 2016

How to Install VNC on Ubuntu 16.04

What is VNC?

VNC, or “Virtual Network Computing“, is a connection system that allows you to use your keyboard and mouse to interact with a graphical desktop environment on a remote server. It makes managing files, software, and settings on a remote server easier for users who are not yet comfortable with the command line.

In this guide, we will be setting up VNC on a Ubuntu 16.04 server and connecting to it securely through an SSH tunnel. The VNC server we will be using is TightVNC, a fast and lightweight remote control package. This choice will ensure that our VNC connection will be smooth and stable even on slower internet connections.

How to Install VNC on Ubuntu 16.04

Before installing the VNC server, let us install Xfce desktop.

Install the VNC server using the following command.

VNC server listens on port 5900, but if you plan to setup port-offset in VNC; we can run a VNC service on a sub-port of the default port 5900.

For example, if we configure VNC for port 5, the desktop will be accessible on port 5905. To connect, you can use the standard format ipaddress:sub-port ( or

Replace <raj> with your real user.

Reload the systemctl daemon as root

Start VNC server as user “raj”

Set the password

Now, Edit the xstartup file to start Xfce desktop in VNC.

Delete all the existing entries and place the below lines into the file.

Start the VNC service as root.

Enable it on system startup as root.

Congratulation’s! You have successfully installed VNC.