• 4
name Punditsdkoslkdosdkoskdo

How do I inhibit exclude from the command line?

Is there a way to inhibit suspend/hibernate from the command line. I want to ssh into my home computer and not have it suspend while I'm working on it.

Use xdotool instead:

sudo apt-get install xdotool

Then, in a bash loop like this

while true ; do
    DISPLAY=:0.0 xdotool key Shift_L   # send a "harmless" keypress to Xorg
    sleep 5                            # wait a little bit and do it again
  • 1
Reply Report