You are not logged in.
Pages: 1
Hello,
I have a new xfce4 install on ubuntu 22.04 that I access from vnc.
If xfce4-screensaver locks the screen, vnc is frozen and I can't unlock from the main display.
How can I unlock xfce4-screensaver from an ssh console?
I tried "xfce4-screensaver-command --deactivate" but I normally get an error message saying that xfce4 screensaver is not active.
Setting just the DISPLAY variable does not help.
"xfce4-screensaver-command --deactivate" works, but only from a screen session that I started from the main display and then detached.
How do I get xfce4-screensaver-command talk to xfce4-screensaver on the vnc screen?
Thanks!
Offline
This is the exact error message I get when trying "xfce4-screensaver-command --deactivate" from the ssh terminal:
"Screensaver is not running! Start xfce4-screensaver first"
Offline
I have a new xfce4 install on ubuntu 22.04 that I access from vnc.
If xfce4-screensaver locks the screen, vnc is frozen and I can't unlock from the main display.
Testing this on Arch linux using x11vnc as the server (started with "x11nvc -ncache 10 -display :0") and using xtightvnc as the viewer from a second computer, everything works fine - I can lock and lock the screen via xfce4-screensaver.
I tried "xfce4-screensaver-command --deactivate" but I normally get an error message saying that xfce4 screensaver is not active.
Doesn't ubuntu use light-locker instead of xfce4-screensaver? What does the following return:
ps -ef | grep -E 'saver|lock'
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks for responding, here is the output of the command (few irrelevant lines removed):
$ ps -ef | grep -E 'saver|lock'
ubuntu 1145 1 0 May21 ? 00:00:00 /usr/bin/xfce4-screensaver
ubuntu 1265 1193 0 May21 ? 00:00:00 /usr/lib/aarch64-linux-gnu/xfce4/panel/wrapper-2.0 /usr/lib/aarch64-linux-gnu/xfce4/panel/plugins/libactions.so 14 37748750 actions Action Buttons Log out, lock or other system actions
ubuntu 8183 8175 0 12:22 pts/0 00:00:00 grep --color=auto -E saver|lock
If this helps, this was not a direct full xubuntu installation, it started with a minimal ubuntu 22.04 cloud installation, then I added the xfce4 and xfce4-goodies.
The tricky part is that, after locking the desktop, if I simply ssh into the machine and try "xfce4-screensaver-command --deactivate", then I get the error message "Screensaver is not running! Start xfce4-screensaver first".
If instead I use the same command from a screen terminal that I had started from the xfce4 desktop and then I had detached... then "xfce4-screensaver-command --deactivate" works!
It seems to me that from a plain ssh connection, xfce4-screensaver-command does not know where to look for the screensaver process. I tried comparing the environment variables of the plain ssh and the screen session, startion from the DISPLAY=:1.0 setting, but I could not make it work.
Any suggestion welcome...
Thanks,
Offline
I did a bit more of systematic test and the environment variable that needs to be properly set is DBUS_SESSION_BUS_ADDRESS
Unfortunately, every time the machine is rebooting the vnc session has a different value for DBUS_SESSION_BUS_ADDRESS
The question now is, how do I add a command at the xfce startup, that stores the vaue of DBUS_SESSION_BUS_ADDRESS somewhere accessible to the ssh terminal?
Offline
Got something working... at startup the xfce4 session for vnc stores the value of DBUS_SESSION_BUS_ADDRESS somewhere so that the ssh user can set the variable accordingly, thus being able to unlock the xfce4 screensaver.
Offline
Got something working... at startup the xfce4 session for vnc stores the value of DBUS_SESSION_BUS_ADDRESS somewhere so that the ssh user can set the variable accordingly, thus being able to unlock the xfce4 screensaver.
The most simple workaround: cretae an empty file xfce4-screensaver in a directory which is in front of the PATH variable of the default command (usually /usr/bin/xfce4-screensaver).
So as root:
touch /usr/local/bin/xfce4-screensaver
After this, the screen will not lock anymore, it may still go black after the configured values in the xfce4 powermanager.
Depending on your distro, you may need to use another path for your dummy screensaver command.
Offline
Pages: 1
[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 547.7 KiB (Peak: 548.54 KiB) ]