Environment: Ubuntu 14.04 bare minimal + Openbox

I have installed pm-utils. Specfically, pm-suspend works great on my laptop. However, I have to run it manually.

I am wondering if there is a way to set Openbox to automatically suspend after, say, 15 minutes of idle time.


Here is one solution I found:

sudo apt-get install xautolock

Add the following to your ~/.config/openbox/autostart file:

xautolock -time 10 -locker "sudo pm-suspend" &

Now the computer will go in suspend mode after 10 minutes of inactivity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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