VNC on Raspberry Pi shows Cannot Currently Show the Desktop

I am trying to use VNC in a headless install on my Raspberry Pi 4, running Raspberry Pi OS, installed via Raspberry Imager. The install is more or less vanilla, as the only changes I have made are for connecting (seting up SSH, wireless and VNC as noted in this guide: ).

When I log in via VNC I get the "Cannot Currently Show the Desktop"-error. It should be possible to fix by changing the screen resolution via raspi-config, but that makes the pi unresponsive. Setting the pi to use "G3 legacy" should fix that issue either after a reboot or without (answers vary on that), but it doesn't seem to make a difference in either case.

Does anyone know how I can get to connect via VNC to my pi?

Thanks :)

4 Answers

According to the documentation:

If your Raspberry Pi is headless (i.e. not plugged into a monitor) or controlling a robot, it is unlikely to be running a graphical desktop.

So the idea is to create a new virtual desktop via vncserver command and use the display number in VNC.

3

Basically should be sufficient to specify a HDMI mode. I have a Raspberry Pi4 headless, this is my configuration in /boot/config.txt

# For more options and information see # # Some settings may impact device functionality. See link above for details # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) hdmi_group=2 hdmi_mode=82 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on # Uncomment this to enable infrared communication. #dtoverlay=gpio-ir,gpio_pin=17 #dtoverlay=gpio-ir-tx,gpio_pin=18 # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on [pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack dtoverlay=vc4-fkms-v3d max_framebuffers=2 [all] #dtoverlay=vc4-fkms-v3d gpu_mem=128 start_x=1 enable_uart=1 #hdmi_enable_4kp60=1 

Then I disabled encryption and set a VNC password. In addition, if you to see the raspistill/raspivid preview through VNC you have to enable this: RealVNC Viewer > Menu > Options > Troubleshooting > Optimize screen capture - select 'Enable direct capture mode'

2

Raspbian Buster:

  1. Launch command line and run:

    sudo raspi-config

  2. Display options -> Resolution. Then select a resolution mode, I recommend select 1280x720 but you can also choose the higher resolution (1920x1080). Save and finish.

  3. Reboot and connect to raspberry again through VNC client.

Raspbian Bullseye:

  1. Launch command line and run:

    sudo raspi-config

  2. Display options -> VNC Resolution. Then select a resolution mode, I recommend select 1280x720 but you can also choose the higher resolution (1920x1080). Save and finish.

  3. Reboot and connect to raspberry again through VNC client.

1

This solved the problem for me: .

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like