I just bought Rpi 5, installed Raspberry pi OS with desktop (without the recommended software), enabled VNC from sudo raspi-config but the VNC is not showing up in the Takbar. It is installed, as if I run:
sudo apt-get install -y realvnc-vnc-server
It says its already installed.
This answer did not start the vnc either, I dont get any errors in the pi when I run these commands but I cant connect to the pi afterwards:

vnc help

The closest thing to connecting was to run vncserver-virtual which gives me an IP , where if I try to connect it drops me this error GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject:

GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject

And if I try to re-connect, no error, gray screen with indications that I connected..:

vnc help2

I noticed that I had two 5900 ports open (sudo lsof -i :5900) thanks to this post. And if I run vncserver-x11 I can see the UI also pops up the error of conflicting ports:
dual 5900 ports open

So I disabled the auto-start of VNC with the pi, and I opened the vnc on my own every time the pi starts up using the command vncserver -x11. I took the Ip from there, but when I tried to connect it showed me black screen like in this post (With the difference that I dont use Raspbian lite, I use the desktop version)...

black screen

I re-enabled the auto start of vnc from start/raspberry pi configuration (so not from using the raspi-config command) and restarted the pi. Now I already had the ip of the vnc on my computer so I didnt need to start the vnc viewer on the pi, I assume it runs at the background with only one :5900 instance, so I can connect using VNC, and I can see the remote desktop!

So the status is: pi opens with VNC since I have it to auto-start with the pi, it doesnt show the VNC window, but it runs at the background and I connect to it, if it doesn't change its IP.

No vnc window

Reinstalling vnc with sudo apt purge realvnc-vnc-server + sudo rm -rf /etc/vnc/ because the uninstaller fails to delete it, and re-installing vnc server (downloading it from their website) does not solve the issue.

  1. Why VNC isnt showing up its window? How can I fix that?
  2. How can I see the VNC's IP without using the VNC window?
  • DO NOT post pictures of text post text.
    – Milliways
    Commented Jan 17 at 11:29
  • Do not use apt-get use apt.
    – Milliways
    Commented Jan 17 at 11:30
  • There is nothing particularly wrong with apt-get; it functions more-or-less identically to apt for the subset of commands it covers. WRT VNC problems, I believe people have been having these on Bookworm because the GUI uses Wayland instead of X11, but you can apparently change that via raspi-config.
    – goldilocks
    Commented Jan 17 at 16:23

2 Answers 2


If you are using X11, Make sure to stop & disable WayVNC via sudo systemctl stop wayvnc and sudo systemctl disable wayvnc as it comes by default (along with Wayland) in Raspberry Pi OS, release date 12/5/23.


RealVNC seems it cannot support RPi 5's move to Wayland environment (for now).

RelVNC's statement:

Our current versions of RealVNC Viewer and RealVNC Server unfortunately will not support the RPi 5 platform out-of-the-box as a result of Raspberry Pi’s move to a default Wayland environment on Debian (Bookworm).

RealVNC has enjoyed being the remote access vendor of choice for the Raspberry Pi platform and of course we’re disappointed that the new stack precludes us from maintaining continuity there just now. It’s worth noting that RealVNC Connect will, of course, continue to work on all versions of Raspberry Pi and PiOS prior to the latest RPi 5 and Bookworm.

We value our partnership with Raspberry Pi highly and we’re broadly supportive of the roadmap items required to see us back on the platform as default remote access provider in short order. Without providing an exact committed delivery date, we are happy to say that we’ll be back up and running on RPi 5 during the first half of 2024.

For now, to connect via VNC:
-I have disabled the VNC on the pi and disabled it from starting up with rpi. (Solves the issue that when I run vnc-server manually it shows up the ip/port is already used).
-I changed the display server to X11 from sudo raspi-config. (Solves the issue that makes the VNC show black screen on PC when streaming).
-I run the vncserver-x11 everytime the rpi boots to run the vnc manually.
And then I can connect remotely.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.