Since the release of Bookworm OS, I’ve seen a number of people struggling to get a VNC server set up on their Raspberry Pi.
So I thought I would take this opportunity to share with you how to get RealVNC installed on yours. We discussed the switch over from RealVNC in our article about Bookworm OS, if you’re interested in getting more details.
Here, I’ll first explain what the issue is and then I’ll give you two options on how to deal with the new setup. One is to install TigerVNC. Two is to revert from Wayland to X11 and then configure RealVNC.
VNC on Bookworm OS
If you’re new to the world of VNC servers and clients, then allow me to briefly explain.
A Virtual Network Computing (VNC) server allows you to remotely access a desktop’s graphical user interface.
While you can use SSH to remotely access the terminal, you can use a VNC server and client (also called a “viewer”) to remotely access the GUI.
So on your Raspberry Pi, you go to Raspberry Pi Configuration and turn on VNC. That gives you the RealVNC server display. Then on your other computer, you download the RealVNC viewer and then you have full control.
Traditionally, on Raspberry Pi Bullseye OS, for example, this looks something like this:
However, with the new update from Raspberry Pi Bullseye OS to Raspberry Pi Bookworm OS, the VNC setup has changed.
The reason is that Bookworm OS doesn’t use X11 as the window manager anymore, but instead relies on Wayland as the default display server. RealVNC, however, is only optimized for X11.
So that leaves you with a couple different options.
Raspberry Pi currently recommends installing TigerVNC as the server and client. So I’ll show you how to do that first.
Alternatively, though, you could still get RealVNC if you desire. So I’ll explain how to do that as well.
TigerVNC is another popular VNC server and client.
So, on Bookworm OS, just go to the applications menu -> preferences -> raspberry pi configuration -> interfaces and then click VNC so it’s enabled.
VNC is disabled by default, because it presents a security risk.
Now, on Bullseye OS, when you enable VNC a RealVNC symbol pops up on the toolbar. With Bookworm OS, however, nothing pops up on the toolbar.
sudo apt update && sudo apt upgrade sudo apt install tigervnc-standalone-server
On you’ll then need to edit the configuration file. For this, you can go to:
sudo nano /etc/tigervnc/vncserver-config-mandatory
From there, you need to scroll down until you see “$localhost should the TigerVNC server only listen on localhost incoming VNC connections.” You need to delete “#” before $localhost = “no” so that it looks something like this:
# $localhost should the TigerVNC server only listen on localhost for # incoming VNC connections # # $localhost = "yes"; $localhost = "no";
And then you need to hit ctrl-x and y to save it as the vncserver-config-mandatory file.
And set the password (it needs to be at least 6 characters). When it asks you if you’d like to enter a view-only password, type n.
Now you’ve set up the configurations for the TigerVNC server.
Now you can run:
And it’ll ask you for the password and then tell you the server port (typically something like 5901).
So now let’s turn to your main computer. You’ll need to have the TigerVNC viewer downloaded on it in order to access the Raspberry Pi’s server.
Open the TigerVNC server and you’ll see the following application:
You need to type in the Raspberry Pi’s IP address followed by the port number, as you can see above. This will open the client and then you’re all set.
You should now be able to remotely access your Bookworm OS desktop.
But what if you’re looking to install RealVNC instead?
Well, in that case, you can actually revert your Bookworm OS from Wayland back to X11.
This requires opening a terminal and typing in:
Then the following screen will pop up:
Then you need to scroll down to Advanced Options, because you need to switch over to X11.
And then you’ll need to hit <finish> and reboot your Raspberry Pi.
Now all you need to do is exactly what you do on Bullseye OS: applications menu -> preferences -> raspberry pi configuration -> interfaces and then click VNC.
That will enable RealVNC automatically. And then you’re set:
Now you just need the RealVNC viewer on your main computer and you should have no problem remotely accessing your Raspberry Pi Bookworm OS desktop!
Now if you’re interested in getting your hands on a Raspberry Pi 5, then check out our contest!
Contest & Newsletter
We know how frustrating it is to have to wait until October 23rd for a Raspberry Pi 5.
So we wanted to make it possible for you to play around with one as soon as possible.
So we’ve set up a contest: What’s the craziest thing you can come up with for Raspberry Pi 5?
Provided your idea doesn’t destroy it, you can send us your idea and we’ll enact it on ours. And we’ll write an article about it!
We’ll announce the winner here and on buyzero.de on October 23rd.
The winning idea (determined by us) will win a full Raspberry Pi 5 kit. This includes a 27W USB-C Power Delivery (PD) Power Supply, a Raspberry Pi 5 case, an SD card, and a Raspberry Pi 5. All with free shipping within the EU.
The runner-up will win a Raspberry Pi 5 with free shipping within the EU.
So be sure to send in your ideas. You can go to the following link for more information: WIN A FREE RASPBERRY PI 5!
There are, I should mention, other VNC servers and clients that you could set up.
And, of course, if you don’t need the full desktop, then just going with SSH from a terminal is a much faster and more lightweight option.
What do you use a VNC for? Any specific projects?
Let us know in the comments below!