0

I am running vino server on a laptop, and a vinagre on another. Both run Lubuntu 18.04. When the first laptop' Lubuntu 18.04 has screen locked, the vinagre on the other shows a black screen, and moving the cursor doesn't show login request. Is there some way to unlock server host's screen from VNC client side, without having to personally move to the VNC server host to unlock the screen? Thanks.

Tim
  • 101,790

1 Answers1

2

You should be able to connect to the other host via ssh as the user with the screen locked, then kill the screenlocking program, for instance if it's xscreensaver:

killall xscreensaver

Caveat: I don't know what's the default screen saver for LXDE desktop or Lubuntu, it may be another program (gnome-screensaver, etc). But that should work exactly the same any way.

Additional info: Apparently LXDE screen-saver is light-locker. Kill this one instead. If you want it to run again, open a terminal in the VNC session and run light-locker there.

Complement about X-Window:

When you're using SSH, you can access the screen you're connected from by using ssh -X <host> or ssh -Y <host>. Programs can perfectly run on a machine and display on another one. So if you run light-locker through SSH on the remote machine, it will lock your local display and not the remote one (just as running gnome-terminal or any other command will run it on the remote machine but display it locally).

wazoox
  • 1,364
  • Thanks. It is light-locker in LXDE. Is screen locking program running as a daemon, or started only when it is time to lock the screen and exit when time to unlock? – Tim Mar 11 '19 at 14:24
  • @Tim it is usually started at session opening. The program runs continuously in the background, and locks the screen when required. After you've killed it, of course it won't restart itself. – wazoox Mar 11 '19 at 14:30
  • If I kill it, will screen not become locked after idleness for a while? Do I need to start light-locker right after killing it for that purpose? – Tim Mar 11 '19 at 14:44
  • @Tim if you want the screen to lock again, yes, you'll have to restart it, but be careful to restart it from the X session you want to lock, not from ssh. – wazoox Mar 11 '19 at 15:01
  • To " restart it from the X session you want to lock", why can't I start it from ssh? do I have to personally move to the VNC server host to do that? What is the command that you restart the locker program of your choice? – Tim Mar 11 '19 at 18:10
  • @Tim locking program work on the X server they're launched from. Kill the screensaver, connect through VNC, open a terminal and run the light-locker& command. – wazoox Mar 11 '19 at 18:31
  • Thanks. I'd appreciate if you could also consider https://unix.stackexchange.com/questions/506556/how-can-i-lock-the-screen-of-a-remote-machine and https://unix.stackexchange.com/questions/505993/what-does-a-locking-program-is-launched-from-a-x-server-mean – Tim Mar 15 '19 at 17:47