简体   繁体   中英

How do I autostart a script in terminal mode based on keyboard activity?

I have a box running Debian command line only, and attached to a monitor. It is always on, displaying its terminal screen on my mini LCD monitor. I want a screensaver for the terminal, and seem to have found one (cmatrix, aafire). I just dont know how to launch the screensaver after 60 minutes of no keyboard input on the local monitor.

How do I launch a specific script or program on the local terminal after say 60 minutes of keyboard inactivity?

Have a look at this thread https://superuser.com/questions/638357/execute-a-command-if-linux-is-idle-for-5-minutes

You could just use xprintidle to queries the X server for the user's idle time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM