Lock screen (requiring password to unlock) when resuming from suspend
I am currently running Slackware 10 on a Dell C600, (PIII 850mhz, 512MB ram) and am using APM (not acpi) for power management. I have the laptop set up so that when I close the lid, the computer goes to sleep. However, when I open the lid again, it returns me to my desktop without requiring a password. I have tried enabling xscreensaver using both the xcreensaver-demo and KDE control interfaces (in both cases configuring the program to require a password to unlock the screen), suspending the computer by closing the lid, then waiting for the xscreensaver timeout before bringing the computer out of suspend mode, but I am returned to my desktop without being required to enter a password. I am running KDE, and would prefer to use KDE's "lock session" feature instead of xscreensaver to lock the screen (although if xscreensaver/some other program is the only way to make it work, it would be acceptable to me to use it) when I bring the computer back out of suspend mode. I have googled high and low, but have not found a way to configure APM or some apm script to lock the screen when the computer enters into or comes out of suspend. If anyone has any suggestions or guidance as to how I could accomplish locking the screen on suspend/resume, or has any feedback as to why the things I tried above did not work, it would be greatly appreciated. Thanks in advance.
Can't really say for sure, cause I use ACPI. But you might wanna check /etc/apm/event.d/ cause scripts placed here are run each time the system suspends/resumes. This is probably where you can tell xscreensaver to lock the screen RIGHT BEFORE suspending the machine. You also might wanna use xscreensaver-command instead of xscreensaver-demo.
case "$1" in
runuser -c 'xscreensaver-command -display :0.0 -lock' [your username]
runuser -c 'xscreensaver-command -display :0.0 -deactivate' [your username]
Of course, you'll have to enable xscreensaver for this to work.
I am using slackware 13 (KDE4), and having the same suspend-resume lock issue, using ACPI for power management.
my /etc/acpi/acpi_handler.sh script looks like:
The xscreensaver is set to blank screen.
The screen doesnt lock on resume.
|All times are GMT -5. The time now is 03:12 PM.|