Lock screen when hibernate or suspend pc via acpi
Pali Rohár
pali.rohar at gmail.com
Fri Sep 19 12:40:14 UTC 2008
Hello,
Kubuntu 8.04 and develop 8.10alfa5 aren't still lock screen, when I
hibernate or suspend pc via acpi (sudo /etc/apci/sleep.sh or sudo
/etc/acpi/hibernate.sh).
On
http://linux-tipps.blogspot.com/2008/06/locking-your-screen-with-dbus-from.html
I found, how to fix.
with dbus-send I can lock screen:
dbus-send --session --dest=org.freedesktop.ScreenSaver
--type=method_call --print-reply ScreenSaver
org.freedesktop.ScreenSaver.Lock
On site
http://linux-tipps.blogspot.com/2008/06/locking-your-screen-with-dbus-from.html
is added this to /etc/acpi/resume.d/90-xscreensaver.sh but better is
when lock script starts earlier.
I creat new file /etc/acpi/resume.d/50-kde4-lock.sh:
------------------------------------------------------------------------
#!/bin/sh
for x in /tmp/.X11-unix/*; do
displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
getXuser;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
su $user -c "dbus-send --session
--dest=org.freedesktop.ScreenSaver --type=method_call --print-reply
/ScreenSaver org.freedesktop.ScreenSaver.Lock"
fi
done
------------------------------------------------------------------------
and this fix this problem.
Can you add this script to new kubuntu 8.10?
--
Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kubuntu-users/attachments/20080919/c04d3d6b/attachment.sig>
More information about the kubuntu-users
mailing list