I have a laptop I'm setting up with SSH open server. It works great after I wake it up with magic packet and login with:
ssh user@host -Y
The problem is the laptop is designed to blank screen after five minutes and suspend after 20 minutes of inactivity.
How can I have a script (or canned package) send fake signals to server as if a user was typing on system? This way host system won't suspend after 20 minutes unless there were 20 minutes of inactivity on the client.
When simulating user activity I'd like the screen blanking to be honored as if there were no user activity on host. I just don't want laptop to suspend when remotely logged in.
Best Answer
I developed a script called
ssh-activity
that:w
command every 60 seconds.dbus
call.wall
command) warning of shutdown or suspend.ssh-activity
scriptSample results on host when
ssh-activity -d
usedRemote terminal output when shutting down
If remote user doesn't type anything in terminal then these messages appears 60, 30, 15, 10, 5, 3, 2, 1 and 0 minute(s) before shutdown (suspend in my case).