I have lxle (Lubuntu) 12.04 installed and I spent lots of time looking for working solution to make PC shutdown after some period of idle state.
After checking many programs which haven't worked I decided to spend much time of shell script solution run by cronjob
I am stuck on 2 problems here.
xprintidle doesn't give any results (empty string) when it is run by cronjob – no matter in crontab file or shell file in those environments it just give empty string instead of number of milliseconds of idle.
Secondly it seems not simple for me to run my script from crontab for shutdown commend as a root.
Could you give me a link explaining that topic? I know only sudo as a user, but script shouldn't ask for password but just shutdown system.