3

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.

Glutanimate
  • 21,183
  • 13
  • 100
  • 153
Peter
  • 483
  • 3
  • 7
  • 16

1 Answers1

2

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.

Glutanimate
  • 21,183
  • 13
  • 100
  • 153
Peter
  • 483
  • 3
  • 7
  • 16