How to prevent sleep until script finish

(how to temporary forbid sleep and suspend)

George Shuklin
OpsOps
1 min readJan 7, 2018

--

Autosuspend is a great feature. Your PC goes into suspend (sleep) after some inactivity period. But if you have some long-running job (backup, computation, etc), you may want to prevent sleep until this job is done.

Manual switch is an option, but there is a better way.

I use Cinnamon, so here is a solution for Cinnamon:

--

--

George Shuklin
OpsOps

I work at Servers.com, most of my stories are about Ansible, Ceph, Python, Openstack and Linux. My hobby is Rust.