VNC server on Ubuntu 18.04



  1. Articles Ubuntu Remote Desktop - 18.04 Bionic Beaver Linux - and VNC server on Ubuntu 18.04 Bionic Beaver Linux - are both written for 18.04, but how do I determine which one I should use?

  2. At the second link, the section “Ubuntu VNC server setup” says to use vnc4server but later on the same page, the steps at “VNC server system startup script” specify vncserver (no “4”). Shouldn’t the program to launch VNC server manually and automatically be the same?


Hi Calta,

In terms of protocol in use both configurations rely on VNC. The first option is intended for desktop sharing of an existing session. Meaning that it allows the client and server to see screen simultaneously. This is great for a remote assistance as the local user can see exactly what the remote user is doing.

The second option where you configure your own VNC server allows you to run one or more unmanaged GUI sessions on your server. For example you have a Ubuntu server with no GUI and you wish to manage the server remotely via GUI or you need to run GUI application and keep it running independently. The advantage here is that you do not need to run full GNOME desktop to manage your server via GUI. This is great for low end hardware devices with limited RAM etc. The disadvantage here in comparison to the first option is that VNC server cannot be configured with a single click however, it gives more configuration options.

Which to choose depends on your needs and environment.

Regarding, the vnvserver vs vns4server. You have a keen eye for details! However, in this case both are interchangeable. Once you install vnc4server execute the following:

$ ls -l `which vncserver`
lrwxrwxrwx 1 root root 27 Jun  4 11:44 /usr/bin/vncserver -> /etc/alternatives/vncserver
linuxconfig@ubuntu:~$ ls -l `which /etc/alternatives/vncserver`
lrwxrwxrwx 1 root root 19 Jun  4 11:44 /etc/alternatives/vncserver -> /usr/bin/vnc4server

As you can see the vncserver is a symbolic link to /etc/alternatives/vncserver which in turn is a symbolic link to /usr/bin/vnc4server. Meaning that by executing vncserver you are actually executing vnc4server.

The advantage of using vncserver instead of vnc4server is that as long as your /etc/alternatives/vncserver is configured correctly you can use any type of VNC server and the script will still work. For example try to install tightvncserver and perform symbolic link check:

$ sudo apt install tightvncserver
$ ls -l `which /etc/alternatives/vncserver`
lrwxrwxrwx 1 root root 23 Jun  4 12:26 /etc/alternatives/vncserver -> /usr/bin/tightvncserver

Hope this helps