Prev: Bash history weirdness
Next: KDE and Gnome
From: André Gillibert on 4 Oct 2009 13:25 yawnmoth <terra1024(a)yahoo.com> wrote: > On Oct 4, 5:24 am, Loki Harfagr <l...(a)thedarkdesign.free.fr.INVALID> > wrote: > > Sat, 03 Oct 2009 20:26:07 -0700, yawnmoth did cat : > > > > > I'd like to make it so my computer turns off after 12h of inactivity. > > > Any ideas as to how I might go about doing this? > > > > you'll need to first define inactivity, as to its > > own "eye" a computer is always 'active'. > > No keyboard or mouse movements. Like how a screensaver defines no > activity. You may write a xscreensaver hack (that's how they call actual screen savers) which would shutdown the machine. Or, you may modify xscreensaver's source code to add a shutdown option. -- André Gillibert
From: jellybean stonerfish on 4 Oct 2009 20:03
On Sun, 04 Oct 2009 08:12:59 -0700, yawnmoth wrote: > On Oct 4, 5:24 am, Loki Harfagr <l...(a)thedarkdesign.free.fr.INVALID> > wrote: >> Sat, 03 Oct 2009 20:26:07 -0700, yawnmoth did cat : >> >> > I'd like to make it so my computer turns off after 12h of inactivity. >> > Any ideas as to how I might go about doing this? >> >> you'll need to first define inactivity, as to its own "eye" a computer >> is always 'active'. > > No keyboard or mouse movements. Like how a screensaver defines no > activity. If you have gnome-screensaver installed, you can query it to find out if it is active, or how long it has been active. gnome-screensaver --time Will tell you how long gnome-screensaver has been active. Check this every minute or two, until the text returned tells you it has been 12 hours. Then do a 'shutdown h now" The xscreensaver package has a similar capability. xscreensaver-command -time |