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.
You also might want to try this script 1, it inhibits to suspend/turn off your machine, I use it when watching movies.
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 done
You might want to disable power management in