Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Slackware 13 on my notebook, and I'm using pm-suspend to have a faster boot up. I'd like to have it run xlock after bringing it back from suspend, is it possible?

share|improve this question

Try placing an executable script in /etc/acpi/resume.d:

DISPLAY=":0" su -c your-user-name xlock

Also, you can try creating a script in /etc/pm/sleep.d that will create xlock-launcher that executes once, at boot. Cheers!

share|improve this answer
Careful, that script will probably run as root, which means xlock will run as root as well (meaning you need the root password to unlock). – Heath Oct 27 '09 at 22:56
What can I do to have it run as user? – David McDavidson Oct 29 '09 at 2:16
I've edited my responce so now it meets Health's remark :) – kolypto Oct 29 '09 at 4:11

You can also try a script like this that you call for suspend:

sleep 3  
sudo pm-suspend   
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.