viernes, 18 de abril de 2014

Script apagar el ordenador cuando salte el salva pantallas

Script to check if the computer screensaver is on on gnome and then shutdown the comptuer.
http://pastebin.com/tESgjN4T

#!/bin/bash
UPTIME=`sudo -u yourUserNameGoesHere env DISPLAY=:0.0 xprintidle`
if [ $UPTIME -gt 1800000 ]; then
pm-suspend
fi