Difference between revisions of "Sleep(Suspend) When Idle"
(Suspend your machine when idle.)
|Line 46:||Line 46:|
Revision as of 06:24, 14 September 2012
The script below can be used to put a frontend to sleep whenever xscreensaver turns the display 'Off' via DPMS. It was written with Mythbuntu 12.04/XFCE in mind, however it could probably be adapted for others distros.
Every 30 seconds it checks if mythfrontend is running and no additional users are logged in (via SSH), if so, it will check the DPMS status via xset, and if it is 'Off' it will suspend the machine.
Make the script executable by your frontend user account, and configure it to run in the session start.
NOTE: DPMS has 4 states; on, sleep, suspend, and off. The script will only trigger on the 'Off' state.