LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-21-2010, 08:27 AM   #1
okie.floyd
LQ Newbie
 
Registered: Oct 2010
Posts: 3

Rep: Reputation: 1
last time user used mouse or keyboard?


i need to write a script that will tell me how long it has been since the user used the mouse or the keyboard.

basically, it would be nice to know where Linux keeps its timer for activating the screensaver. i know you can set the values via xset, but i need to be able to query the system and know how long it's been since there was a GUI event caused by user input.

anyone know where i can find this information?

thanks

okie
 
Old 10-21-2010, 02:04 PM   #2
okie.floyd
LQ Newbie
 
Registered: Oct 2010
Posts: 3

Original Poster
Rep: Reputation: 1
this may be a lot more difficult than i thought, which is kinda sad.

after looking a little bit at the xscreensaver code, it looks like they are just checking each of the windows in X and keeping track of the mouse movement. basically just polling X with Xt calls.

if there is anything i want to stay away from, it is dealing with Xt crap. been there, done that.

was hoping there would be something i could cat out. /proc/interrupts doesn't help if you don't have the right connections (basically, USB connections make it useless).

no other clues?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i need to lock my keyboard and mouse for a short period of time and also unlock them balajitrz Linux - Hardware 3 02-16-2007 12:46 PM
i need to lock my keyboard and mouse for a short period of time and also unlock them balajitrz Linux - Hardware 1 02-16-2007 01:00 AM
user login: no keyboard access (mouse OK) - no problem under root guillaume31 Mandriva 2 07-20-2004 12:24 PM
Time without touch the keyboard or move the mouse fariz83 Programming 0 03-28-2004 12:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 11:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration