2 ms·
There is a command line tool for this: "caffeinate". You can add a script that runs it while there are SSH sessions open.
by cyberax 1y ago
There is a command line tool for this: "caffeinate". You can add a script that runs it while there are SSH sessions open.
- Daneel_ 1y agoIt's a failing that I need to pre-empt every situation where I don't want the machine to sleep and run a tool to prevent it from sleeping, when I could usually just say 'don't sleep when I shut the lid'.
- cyberax 1y agoThat's probably because most people _want_ their laptop to sleep each time they close the lid. The exceptions are really narrow. E.g. if you want your SSH sessions to stay alive, you also need to ensure that you never leave the WiFi coverage.
- Daneel_ 1y agoI don't disagree, but at least give me an option like windows does.