0

Is there some way to set up to run a command (e.g. pm-suspend or any other command) automatically, whenever there is no user activity (mainly no user input from keyboard, touchpad, mouse, maybe except user-started long running programs) for a specified amount of time?

For example, is there a system directory where I can put a configuration script which will be called automatically once user is inactive in the above sense for a specified amount of time?

My OS is Ubuntu 16.04, and I prefer solutions which are not binded to specific desktop environments.

Thanks.

  • You could use crontab/cron. But this is just for automation. – TheSebM8 Apr 5 '18 at 11:53
  • Does crontab/cron detect no user activity for a certain amount of time? – Tim Apr 5 '18 at 11:55
  • Sadly no, thats why i mentioned that it is just for automation. – TheSebM8 Apr 5 '18 at 11:57
  • one google search askubuntu.com/a/202145/93232 – Kiwy Apr 5 '18 at 12:05
  • @Kiwy Does xprintidle allow me to set up running a command or script once no user activity for a specified amount of time? – Tim Apr 5 '18 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.