How to set up VNC server on Linux

Virtual Network Computing (VNC) allows you to share desktop environment on a local host with other remote users over network. To share desktop, a VNC server should be running on a local host, and remote users connect to the VNC server by using any VNC viewer client.

In this tutorial, I will explain how to configure VNC server on Linux. In this set up, I will use vino, VNC server software for the GNOME desktop environment.

To install vino VNC server on Debian, Ubuntu or Linux Mint desktop:

$ sudo apt-get install vino

To install vino VNC server on Fedora, CentOS or RHEL desktop:

$ sudo yum install vino

After installation, you can start vino, and enable VNC server by entering vino-preferences command.

$ vino-preferences

The above command will open up vino's desktop sharing preference window as shown below. On this window, click checkbox on "Sharing" to allow users to view and control your desktop. Optinally, set up VNC password. You can close the window after you are done with configuration.

The vino-preferences utility is then supposed to start vino VNC server automatically. If VNC server is not launched for whatever reason, you can start VNC server manually as follows.

$ /usr/lib/vino/vino-server &

On the latest Linux Mint Cinnamon desktop, vino-preferences is known to be missing. To enable and configure VNC server on Mint Cinnamon desktop, use dconf-editor instead, as described here.

You can check if vino is running by typing the following command.

$ sudo netstat -pl | grep vino
tcp        0      0 *:5900                  *:*                     LISTEN      6646/vino-server
tcp6       0      0 [::]:5900               [::]:*                  LISTEN      6646/vino-server
tcp6       0      0 [::]:5800               [::]:*                  LISTEN      6646/vino-server

As shown above, vino-server is running on TCP port number 5800 and 5900. You can use any VNC client software to connect to the VNC server.

If VNC server is configured such that you must confirm each VNC access on your desktop, you will see the following pop up message every time a VNC connection request is received. Only when you allow VNC access, will VNC client be able to access your desktop.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

7 thoughts on “How to set up VNC server on Linux

    • Yeah tightvncserver is also a solid lightweight VNC server. It's just that vino comes with Ubuntu or Fedora by default, so you don't need to install any other software.

  1. Hi,

    I am using Linux Mint Debian 17. I installed vino and vinagre, but when I type "vino-preferences", the terminal says:

    vino-preferences: command not found

    What should I do in order to fix it and continue with the other stages?

  2. I have solved this on Linux-Mint 17.1 Rebecca Xfce by sudo apt-get install x11vnc

    The next run (for set up a password):
    x11vnc -storepasswd

    And then example run:
    x11vnc -ncache 10 -usepw -ssl

    Allow the service vnc-server on the firewalld

Leave a comment

Your email address will not be published. Required fields are marked *