Categories
raspberry pi

Connect to Raspberry Pi VNC Server from Ubuntu

This example is setup entirely within an internal private home network from a laptop to a Raspberry Pi 3B+ without the need for traversing a router firewall or other obstacle. In other words it will (and should not) work if you attempt to connect to the VNC server from outside your local home network.

Keep in mind the server bears the processing weight therefore best left to the Pi 3, 4, and above. If possible SSH is the more appropriate choice for most remote connections, particularly to the less powerful machines (e.g. Pi Zero). It will be faster to complete most tasks knowing the command line control of what you desire and handle with SSH.

If you are working with Ubuntu hosting the server, a different post covers x11vnc server on 20.04.

Initial Setup

The Raspberry Pi to be running the VNC server must have Raspbian/Raspberry Pi OS (preferably freshly) installed and upgraded. . A second client machine should have a working version of Linux or Windows installed and operational (laptop, notebook, desktop, etc.).

Enabling VNC

Run the raspi-config configuration application.

$ sudo raspi-config

On the main screen, select option #5 named ‘Interfacing Options’:

raspi-config initial screen

On the following screen, choose option “P3 VNC”:

raspi-config interface options - VNC highlighted
raspi-config interfacing options – VNC highlighted

A confirmation screen is displayed, select ‘Yes’, then reboot the device.

raspi-config enable VNC prompt
$ sudo reboot

From the Client to the Server

Once the VNC server device has rebooted a choose a client machine and test the connection. Here Remmina is used since it is already installed on the Ubuntu 20.04 machine being used. If running Windows on the client machine, RealVNC is a popular choice.

Open client application and enter the IP address of the VNC server device created above and hit the [Enter] key.

Remmina client with VNC server device IP entered

Leave a Reply