It is occasionally useful for me to know when my machine (Debian wheezy) was last touched. To be precise, I mean the more recent of the times I typed on the keyboard or moved the mouse. When I currently try to do this, I adopt ad-hoc means, like checking the last modification times of files that I was editing. However, a most systematic way would be useful. If not the precise time, approaches to get a reasonably close estimate would be welcome. I would prefer methods that used information that was not easily destroyed, like file modification times.
I suppose the ultimate approach would be to install some kind of program that monitors my computers activity. I don't know if I would go so far, but would be willing to hear about it, at least.
Any software installed for this purpose must be free, and available in Debian, for preference. Having said that, solutions don't have to be Debian-specific, or even Linux specific. In fact, it is better if they are not.
It's ok if only activity in an X11 session is taken into account.
ls -lah /dev/console /dev/input/mouse0 /dev/input/mice crw------- 1 root root 5, 1 Oct 20 01:40 /dev/console crw------- 1 root root 13, 63 Oct 14 07:31 /dev/input/mice crw------- 1 root root 13, 32 Oct 14 07:31 /dev/input/mouse0
– Faheem Mitha Oct 21 '14 at 07:28