waayne
Posts: 4
Joined: Mon Jun 25, 2018 9:42 pm

[VNC] Cannot currently show the dekstop

Mon Jun 25, 2018 9:46 pm

Hey,

I have a problem with my Pi 3+. I activated the VNC server and tried to connect to it on my tablet via the VNCViewer app.
But when I am connected to it there is an error (see attachment).
What can I do to fix that?
Attachments
Screenshot_20180625-234118.png
Screenshot_20180625-234118.png (47.06 KiB) Viewed 21665 times

klricks
Posts: 6365
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: [VNC] Cannot currently show the dekstop

Tue Jun 26, 2018 1:23 am

waayne wrote:
Mon Jun 25, 2018 9:46 pm
Hey,

I have a problem with my Pi 3+. I activated the VNC server and tried to connect to it on my tablet via the VNCViewer app.
But when I am connected to it there is an error (see attachment).
What can I do to fix that?
The RPi must be set to boot to desktop (service mode).
If a HDMI monitor is not attached then you need to specify a screen resolution in config.txt
Use GUI config tool or sudo raspi-config to do that.

If not booting to desktop then you need to use virtual mode. (Run vncserver from the command line).
Unless specified otherwise my response is based on the latest and fully updated Raspbian Stretch w/ Desktop OS.

coldsprite
Posts: 2
Joined: Thu Jul 05, 2018 9:25 pm

Re: [VNC] Cannot currently show the dekstop

Thu Jul 05, 2018 9:27 pm

I have same problem.
I enabled service mode desktop auto login, and default resolution.
Still see same "Cannot currently show the desktop" error on VNC.

Thanks

coldsprite
Posts: 2
Joined: Thu Jul 05, 2018 9:25 pm

Re: [VNC] Cannot currently show the dekstop

Thu Jul 05, 2018 9:29 pm

I have the same problem.
Already tried the recommendation, still same error.

klricks
Posts: 6365
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: [VNC] Cannot currently show the dekstop

Thu Jul 05, 2018 9:38 pm

coldsprite wrote:
Thu Jul 05, 2018 9:27 pm
I have same problem.
I enabled service mode desktop auto login, and default resolution.
Still see same "Cannot currently show the desktop" error on VNC.

Thanks
Do not use default resolution. Choose something else.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Stretch w/ Desktop OS.

jkellogg11
Posts: 1
Joined: Sun Jul 08, 2018 11:21 pm

Re: [VNC] Cannot currently show the dekstop

Sun Jul 08, 2018 11:34 pm

You need to install a window manager.

Check out this post.

viewtopic.php?f=66&t=133691

My .xsession-errors file showed this. After installing LXDE I could login.

root@raspberrypi:~# cat .xsession-errors
Xsession: X session started for root at Wed 18 Apr 13:50:07 UTC 2018
Xsession: unable to start X session --- no "/root/.xsession" file, no
"/root/.Xsession" file, no session managers, no window managers, and no
terminal emulators found; aborting.

olafvandekuijt
Posts: 14
Joined: Mon Jul 09, 2018 6:35 am

Re: [VNC] Cannot currently show the dekstop

Mon Jul 09, 2018 6:49 am

Hi,

I had the same problem.
After changing the resolution to the highest it was solved (sudo raspi-config)

Olaf

pk_rulz
Posts: 1
Joined: Fri Aug 31, 2018 8:57 am

Re: [VNC] Cannot currently show the dekstop

Fri Aug 31, 2018 9:54 am

If everything was working fine and it stopped suddenly then there is possibility that you might have run out of space on the SD card.
I am listing it down to help someone who have such a problem

The following thread should help you to fix that issue
https://www.raspberrypi.org/forums/view ... hp?t=71520

In a nutshell
If you can connect over ssh, this should show you if your /dev/root is full

Code: Select all

df -h

If it is, this should help you locate the culprit folder/file. Remove it and vnc should work fine.

Code: Select all

sudo du -xh / | grep -P "G\t"
For more advanced options the thread link at the stop should help

demian
Posts: 1
Joined: Tue Oct 08, 2013 6:28 am

Re: [VNC] Cannot currently show the dekstop

Thu Oct 04, 2018 7:09 am

In my case...

I installed lxsession(sudo apt-get install lxsession)
, then work OK.

nikitakaps
Posts: 1
Joined: Fri May 24, 2019 3:42 pm

Re: [VNC] Cannot currently show the dekstop

Fri May 24, 2019 3:47 pm

I tried everything mentioned in this thread, but nothing worked. What helped me was deleting the /home/pi/.profile using sudo rm .profile
After rebooting I was automatically logged in and everything worked as before. Hope this helps!

Anantasak
Posts: 1
Joined: Sun Jun 09, 2019 7:30 am

Re: [VNC] Cannot currently show the dekstop

Sun Jun 09, 2019 7:37 am

For some case:

Found that problem cause by lxsession file damage. Try PD by running lxsession and find out which package broken then reinstall specific package.
pi@raspberrypi:~ $ lxsession
lxsession: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: nonzero padding in e_ident
Fixed by checking md5 libgtk-x11-2.0.so.0 a.k.a libgtk-x11-2.0.so.0.2400.31
pi@raspberrypi:/usr/lib/arm-linux-gnueabihf $ md5sum libgtk-x11-2.0.so.0.2400.31
845a355f212cfb3ac3e9cb6926002615 libgtk-x11-2.0.so.0.2400.31
then rerun install package
sudo apt-get install --reinstall libgtk2.0-0
to resolved lxsession
pi@raspberrypi:/usr/lib/arm-linux-gnueabihf $ lxsession
** Message: main.vala:102: Session is (null)
** Message: main.vala:103: DE is (null)
** Message: main.vala:107: No session set, fallback to LXDE session
** Message: main.vala:113: No desktop environnement set, fallback to LXDE

User avatar
RottenRonnie
Posts: 4
Joined: Thu Feb 26, 2015 1:15 am
Location: Charlottetown PE, Canada
Contact: Website

Re: [VNC] Cannot currently show the dekstop

Fri Jun 14, 2019 4:45 pm

I used these steps to get the RealVNC server to work after reading the posts above:
(Note that resetting the max resolution in raspi-config had no effect and I was still seeing the error message.)

Code: Select all

ron@raspberrypi:~ $ cat .xsession-errors 
The error that I saw:

Code: Select all

/usr/bin/x-session-manager: 33: exec: /usr/bin/lxsession: not found

Code: Select all

ron@raspberrypi:~ $ ls /usr/share/xsessions
lightdm-xsession.desktop  openbox.desktop
ron@raspberrypi:~ $ cat /usr/share/xsessions/lightdm-xsession.desktop 
[Desktop Entry]
Version=1.0
Name=Default Xsession
Exec=default
Icon=
Type=Application
ron@raspberrypi:~ $ sudo apt-get install --reinstall lxsession
Success!!! I'm currently logged into the regular pixel desktop. :mrgreen:

Return to “Troubleshooting”