Issues using x11vnc when xfce's lock screen is active

7,601

Solution 1

Looks like theres a bug from 2014 which covers this:

https://bugs.launchpad.net/ubuntu/+source/light-locker/+bug/1287171

I ended up removing light-locker and installing xscreensaver, and now I no longer have any vnc issues.

Solution 2

light-locker switches to :1 when locking, so that explains why the vnc server running on :0 only sees a black screen.

The workaround is simply to start another vnc server at :1, connect to it, enter password, and go back to the original vnc connection at :0

x11vnc -auth /var/run/lightdm/root/\:1 -display :1
Share:
7,601

Related videos on Youtube

drdrez
Author by

drdrez

Updated on September 18, 2022

Comments

  • drdrez
    drdrez over 1 year

    I am on xubuntu 14.04.04, and have successfully managed to get a VNC server up and running with SSH tunneling and such. However, I'm experiencing an issue with the VNC server, x11vnc 0.9.13. Currently, I have the following command execute on start up:

    x11vnc -shared -forever -bg -auth guess

    The -auth guess part uses x11vnc -findauth to automatically find the correct XAUTHORITY file, which on my system appears to be /var/run/lightdm/root/:0.

    Here is the issue I am experiencing: the VNC setup works as expected until the lock screen appears (either when I manually lock the desktop, or an inactivity timeout occurs). When the lock screen appears, the VNC server displays the contents of the desktop just before the timeout occurs, a sort of still-frame or snapshot, and all input from my VNC client is ignored. I am unable to unlock it and return to my desktop from within the VNC client; I must use the remote system's keyboard and monitor. After it has been unlocked non-remotely, the VNC works as expected, until the screen lock appears again.

    A few things I should mention:

    • I am able to select my user account and login from the account login screen without any issues over VNC, but when the desktop is locked, the issue occurs and I cannot unlock it.
    • The command sudo x11vnc -findauth returns XAUTHORITY=/var/run/lightdm/root/:0 only while I'm on the initial login screen after I first boot up. After I login, the same command returns XAUTHORITY=, whether I'm on my desktop or the screen is locked.
    • Takkat
      Takkat about 8 years
      You could try to run x11vnc on gdm/lightdm: askubuntu.com/questions/25189/…
    • drdrez
      drdrez about 8 years
      @Takkat Looks like my current configuration is already pretty similar to the answer you gave in the question you linked. I'll update my question with some more info on what I have tried and what my issue is.
  • JRI
    JRI almost 3 years
    This worked for me, but only once I remembered to forward the port for the extra VNC server through the SSH tunnel I'm using (port 5901 in my case).
  • Eduardo Trápani
    Eduardo Trápani about 2 years
    Thanks for the explanation and the workaround! It works and makes sense.