LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   get xfce 4.6.2 to lock screen on suspend (http://www.linuxquestions.org/questions/linux-desktop-74/get-xfce-4-6-2-to-lock-screen-on-suspend-4175414479/)

vayira 07-02-2012 12: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 https://bugzilla.xfce.org/show_bug.cgi?id=6019 and here http://mail.xfce.org/pipermail/xfce/...ry/028398.html there is a suggestion for a workround.

Following those instructions I created this script
Code:

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 12:46 PM

Ah I also get the following error...

Code:

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

Code:

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 11:31 PM.