VNC (Virtual Network Computing) is a widely used protocol for remotely accessing a computer’s desktop. VNC is a cross-platform alternative to Microsoft’s RDP protocol. In this tutorial, we will show you how to use VNC to remotely access the desktop of an Ubuntu Linux host over the network.
VNC is already built into the latest versions of Ubuntu and doesn’t require additional packages to be installed.
You can enable VNC in the Ubuntu settings control panel (Settings -> Sharing). Turn on the switch at the top of the window (highlighted in the screenshot).
Then click on Screen Sharing. In the window that appears, also turn on the switch at the top of the window. The VNC server is now up and running and ready to connect.
Several additional VNC options are available in this window:
- Allow connections to control the screen — enabled by default (if you disable the option, only screen viewing will be allowed for the remote VNC connection);
- New connections must ask for access — if the option is enabled, then your VNC connection must be accepted by the local user. If you change the option here to Require a password, then you can remotely connect to Ubuntu via VNC even if there is no active user on the console.
To remotely connect to the Ubuntu desktop, you can use any tool that supports the VNC protocol. Ubuntu comes with a pre-installed Remmina Remote Desktop Client app. For a remote connection, select the VNC protocol and enter the IP address (or the hostname). To connect via VNC, TCP port 5900 must be open.
In this case, you will connect to the current user session on the computer.
If you are connecting to your Ubuntu desktop from Windows, you can use any of the following popular VNC clients: UltraVNC, VNC Viewer, TightVNC, Real VNC, etc. Before the first connection, you need to run the following command to disable encryptionon the Ubuntu side (otherwise security errors will appear: “encryption not supported” or “the authentication method requested is not available”):
$ sudo gsettings set org.gnome.Vino require-encryption false
Unable to connect to VNC Server using your chosen security setting. Either upgrade VNC Server to a more recent version from RealVNC, or select a weaker level of encryption.