-   Linux - Desktop (
-   -   get xfce 4.6.2 to lock screen on suspend (

vayira 07-02-2012 01:37 PM

get xfce 4.6.2 to lock screen on suspend
I'm using debian 6.0.2 which comes with xfce 4.6.2.

If I suspend the system the screen lock does not activate even though I have this option selected in the power manager.

This is documented here and here there is a suggestion for a workround.

Following those instructions I created this script

dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.sleep

dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend

It suspends the system (instantly!) but doesn't lock the screen. Any suggestions?

vayira 07-02-2012 01:46 PM

Ah I also get the following error...


Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files
Is it necessary to stop the network service before suspending?

I've now changed the script to


xscreensaver -nosplash
xscreensaver-command -lock

dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend

That does work, but I'm left with the doubt about the network.


All times are GMT -5. The time now is 02:52 PM.