[arch-general] Xscreensaver is Active on Resume from Manual Suspend
Leonid Isaev
lisaev at umail.iu.edu
Sat Dec 3 13:27:09 EST 2011
On Sat, 3 Dec 2011 13:06:55 +0100
Bastien Dejean <nihilhill at gmail.com> wrote:
> Hi,
>
> I would like to know why I see xscreensaver when I resume from suspend
> even if I manually suspend.
>
> Greetings,
Xscreensaver does not activate by default on resume unless:
1. The time interval between suspend and resume is longer than xscreensaver
timeout.
2. There is an explicit script in /etc/pm/sleep.d which locks thescreen on
resume. For example:
#!/bin/bash
pid=$(pidof -o %PPID /usr/bin/xscreensaver)
case $1 in
hibernate)
;;
suspend)
if [ "x$pid" != "x" ]; then
x_owner=$(/bin/ps -e u | /bin/grep xscreensaver \
| /bin/grep $pid | \
/bin/awk '{print $1}')
/bin/su $x_owner -c \
"/usr/bin/xscreensaver-command -lock &> /dev/null"
fi
;;
thaw)
;;
resume)
;;
*)
exit 1
;;
esac
Personally I always prefer to have such a script to prevent unauthorized
access.
--
Leonid Isaev
GnuPG key ID: 164B5A6D
Key fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20111203/582804d4/attachment.asc>
More information about the arch-general
mailing list