Raspberry Pi OS supports VNC by default, but it needs to be enabled from a settings menu or, for Raspberry Pi headless VNC, you can use raspi-config over SSH. In addition to enabling VNC on a Raspberry, this article will show you how to connect to a VNC server from a similar, Debian-based OS.
How to Enable VNC on Raspberry Pi
Turning an RPi into a VNC server can be as easy as toggling a setting, but you still need to find your IP address to make any use of it.
-
To enable VNC server functionality, go to Preferences > Raspberry Pi Configuration.
-
Go to the Interfaces tab and enable VNC.
-
Important: set your user’s password from the System tab. If your user has no password, some VNC clients may fail to connect.
-
Find out your local IP by running the “ifconfig” command.
How to Install Raspberry Pi VNC in Terminal
This alternative method of enabling VNC can be useful if you’re running a headless RPi setup, or a Raspberry Pi IoT VNC server that can only be accessed over SSH.
-
Run raspi-config with sudo rights.
-
Go to Interface Options.
-
Enable VNC from the menu.
-
Use the passwd command instead of setting the user password from the configuration menu.
How to Connect to VNC on Raspberry Pi
This example was tested on Debian. However, tigervnc-viewer is also available on Raspberry Pi OS.
-
Install tigervnc-viewer.
-
Run xtigervnc-viewer with the host IP as the argument.
-
Accept any mismatches with the certificate.
-
Authenticate with the host.
-
You now have a working VNC session.