[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: autolock console



On Tue, Apr 07, 2009 at 08:37:42PM -0800, Ken Irving wrote:
> On Wed, Apr 08, 2009 at 10:26:27AM +1000, Daniel Dalton wrote:
> > possible to run a command after a certain number of minutes where no
> > keys have been pressed? Like the gnome screen saver, except for the
> > console. I want to be able to run vlock after say 15 minutes with no one
> > pressing anything on the keyboard.
> > 
> > Thanks!
> 
> I don't know where to get that information, the time since last keypress,
> but my guess is that it's probably somewhere in the /proc/ filesystem.

Ok.

> If you can find it there, then come up with a command, e.g., using grep
> or awk, to check for the condition you're interested in and do something.
> Invoke that every minute or so via cron, perhaps in a wrapper script.

Not hard, just finding the info is the tricky bit... :)

> 
> You might try google for resolving or at least hinting at questions
> like this.  Just describe your query very briefly at www.google.com.
> Include terms like linux or debian to help narrow it down if necessary.

I have, not much info around really, but will keep searching.
Perhaps when I complete my python book I'll just write a program do do
this... Run as a daemon, listen for a key press, if key press then reset
timer. If timer gets above user.preference_timer os.system(run) or
something along those lines.
A lot more code than that though!

> Try it; it's quite an amazing resource.  ;-)

It is... :)

> 
> Ken
> 

Daniel.

Attachment: signature.asc
Description: Digital signature


Reply to: