Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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


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.