Hacker News new | ask | show | jobs
by cyberax 272 days ago
There is a command line tool for this: "caffeinate". You can add a script that runs it while there are SSH sessions open.
1 comments

It'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'.
That'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.

I don't disagree, but at least give me an option like windows does.