Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm searching for the possibility to execute a shell script or command based on idle time in the bash shell.

As an example, if I'm in a SSH session to a server of mine and after X minutes of inactivity in the terminal, I want a command to start a desired program like cmatrix, and when I come back and press a key I will get back where I left.

share|improve this question
You can check the load on cpu using top –  totti May 7 '13 at 9:48

1 Answer 1

Apparently GNU screen has screensaver capabilities similar to what you're asking, if you put this in your .screenrc:

blankerprg cmatrix -ab -u2
idle 60 blanker
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.