Post by Marco MoockHello!
Is there a way to automatically lock the screen when the system goes
into suspend when using xscreensaver?
Yes, see below. This is a paired down script I use:
SCRIPT START-----------------------------------------------
#!/bin/bash
#
# This is File
# /lib64/elogind/system-sleep/10_sleep.sh
# on 64 bit systems, 32 bit, maybe /lib/ ?
# do a chmod 755 on it
#
# Edit /etc/elogind/logind.conf (slackware 15.0)
# You may need to add this:
# HandleLidSwitch=suspend
g_user_01=YOUR-USER-ID
case $1/$2 in
pre/*)
logger "INFO ELOGIN: processing $1/$2 SLEEP"
su $g_user_01 -c "(xscreensaver-command -lock)"
# expirement with this setting
sleep 2
;;
post/*)
logger "INFO ELOGIN: $1/$2 RESUME"
;;
esac
SCRIPT END -----------------------------------------------
HTH
--
[t]csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars