Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a command in Ubuntu to determine when the mouse was moved last? The screensaver clearly knows, but how can I access that data from the terminal?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Screensavers do their own polling for mouse movement (position change) or clicking. See the XScreensaver FAQ number 10 which states exactly that behaviour. And as Jamie Zawinski — the author of XScreensaver states in this bug report, the position is only checked every 5 seconds.

If you do not want to think about how to implement it yourself, you can use the C source code or the small apps given in this stackoverflow question, namely xprintidle, xidle.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.