acpi-support: Lock screen with dbus during resume
Dennis.Jansen at web.de
Wed Jul 9 11:54:19 BST 2008
what do you think about using dbus to fix the screensaver locking in recent
versions of GNOME and KDE.
A slightly adapted version of /etc/acpi/resume.d/90-xscreensaver.sh.
# lock the screen via dbus
if pidof dbus-daemon > /dev/null; then
for x in /tmp/.X11-unix/*; do
displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
if [ x"$XAUTHORITY" != x"" ]; then
su $user -c "dbus-send --session --dest=org.freedesktop.ScreenSaver \
--type=method_call --print-reply /ScreenSaver \
Of course locking might be replaced with e.g. SimulateUserActivity. If you
would like any changes for integration let me know.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ubuntu-devel-discuss