I replaced gnome-screensaver with xscreensaver, it works great so far, but I can't get it to lock my session when I suspend my laptop.
Any ideas how to do that?
Ubuntu 10.10 Dell Vostro 1310
I'm no expert, but I think you could edit
This will, however, execute twice - once when you suspend, then again when you resume.
Edit : This is a little more involved (not much), but from this thread, it appears that you're better off creating your file in /usr/lib/pm-utils/sleep.d with the command you want to run. So in full, here's the commands from the terminal :
Then put this in the file and save :
Then try a suspend to see if it works when you resume.
Finally I found the right way of doing this combining the parts I found in /etc/acpi/sleep.sh (that seems left unused there), and Scaine pointed in /usr/lib/pm-utils...
So the final script that works for me is: /usr/lib/pm-utils/sleep.d/00xscreensaver
The actual xscreensaver commands can also invoked trough su (instead of sudo) like
but that won't works for me because I use pam_mount to mount my encrypted home during login, and pam asks for my password for pam_mount in the script when I use su...