I just put together a simple system to automatically shut down terminals after 
90 minutes of inactivity.
My ltsp5 is on debian squeeze.

install cron and xprintidle.

I put script idleoff script in /usr/local/sbin
.............................................
#!/bin/bash
#install xprintidle and cron packages
export DISPLAY=:7
export XAUTHORITY=`ps -ef|grep xinit |grep -v grep|cut -d" " -f 26`
#`grep XAUTHORITY /var/log/ldm.log`
# time is in miliseconds
#90 minutes 90*60*60*1000 324000000
idletime=`/usr/bin/xprintidle`
if  (( $idletime  >  324000000 )) ; then
   shutdown -h now;
fi
.............................
I'm sure it can be improved on.
No real error checking but pretty sure errors will not cause shutdown.

in lts.conf add
        CRONTAB_01 = "*/10 * * * * root /usr/local/sbin/idleoff"

John


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to