It’s a truly frustrating error you may encounter when you try to connect to your Raspberry Pi remotely using VNC. After you’ve done a Raspberry Pi headless install, you try getting remote access to the desktop environment, but VNC viewer (or some other client) gives you a black screen and with the message “Cannot currently show the desktop” on it.
There are a couple of possible solutions for the “Cannot currently show the desktop” error message when connecting to your Raspberry Pi. Try each and see if it resolves the issue. All of the solutions below involve using the command prompt, either by directly connecting a keyboard and mouse to your Raspberry Pi or by using a remote SSH connection to get to the terminal. Massive hat tip to the folks in this forum thread who offered solutions and inspired this article.
Change Your Screen Resolution
Even though it should have a working default setting, often changing resolution at the command prompt.will solve the “Cannot currently show the desktop” error. To do this:
1. Launch raspi-config.
2. Select Advanced Options-> Resolution.
3. Choose a resolution. We recommend at least 1280 x 720, but some users report that choosing the highest possible (usually 1920 x 1080) is what they needed to do.
You’ll need to reboot your Raspberry Pi for this change to take effect.
Install or Reinstall LXSession
One reason that Raspberry Pi might be giving you the “cannot show the desktop” error is that there’s a problem with your session manager or it’s just not installed.
To install LXsession, type:
sudo apt-get install lxsession
If LXSession is already installed, you should try reinstalling LXSession and the libgtk2.0-0 library:
sudo apt-get install --reinstall libgtk2.0-0 sudo apt-get install --reinstall lxsession
Boot to Desktop Mode
If your Raspberry Pi has LXDE, the desktop environment installed, but it’s set to boot to command prompt, you won’t be able to view the desktop via VNC. To change Raspberry PI’s boot mode:
2. Select Boot Options->Desktop / ClI-> Desktop Autologin then hit Enter and select Finish to exit the software.
Clear Space in Root Partition
It’s always possible that your desktop isn’t available, because you’ve run out of disk space. The way to find out is to type the following at the command prompt:
You’ll see a list of partitions and their amount of free space. If your root partition has no or almost no free space, that could be the problem and you should consider uninstalling some stuff or moving to a larger microSD card.
Stay on the Cutting Edge
Join the experts who read Tom's Hardware for the inside track on enthusiast PC tech news — and have for over 25 years. We'll send breaking news and in-depth reviews of CPUs, GPUs, AI, maker hardware and more straight to your inbox.
Changing the resolution to 1920x1280 worked fine for me. Thanks.Reply
DMT Mode 35 1280x1024 60Hz 5:4 works for me, Thanks for the solution!Reply
Changing resolution on DMT 35 1280x 1024 via SSH on RaspPi helps me as well. Thank you.Reply
I was working on installing maven on my raspberry pi3b+ and when I rebooted it, it asked me to enter my password again. Upon entering the password a message pops up: Cannot currently show the desktop".Reply
I tried the following but nothing worked:
a) changed the screen resolution to 1280 x 720 and 1920 x 1080
b) installed and reinstalled Lx session
c) booted to desktop mode
d) cleared some space
I changed it to autologin to desktop, but now I can't SSH into it or use VNC. Help?!Reply
If doesn't fix try sudo dpkg-reconfigure lightdm it worked with meReply