Difference between revisions of "Sleep(Suspend) When Idle"
m (category specifically for python scripts using the python bindings)
|Line 46:||Line 46:|
Latest revision as of 07:27, 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.