chrols
July 24th, 2008, 01:01 PM
I'm writing a bash script which will be run as a cron-job, since the script makes the computer rather sluggish during its execution I'd like to find some way of checking wherever someone is actively using the computer or not.
So if anyone knows how to check if the keyboard/mouse is being used or have some better suggestion I'd be grateful for the input.
Also I should state that I'm aware that I could check if any of the user accounts are logged on fairly simple, however this doesn't cover the likely situation that a user is logged on but not active.
So if anyone knows how to check if the keyboard/mouse is being used or have some better suggestion I'd be grateful for the input.
Also I should state that I'm aware that I could check if any of the user accounts are logged on fairly simple, however this doesn't cover the likely situation that a user is logged on but not active.