Sleep timer

Hello,
Is it possible to create a shortcut to the desktop with a command to turn off the computer after an hour or 30mins for example(sleep timer). I usually fall asleep while watching a series and then the episodes go on and on all night.
Greetings, Tomi

Welcome to the Forum!

You could use the Settings in the Energy Menu. There You can set a Timer:

Maybe this is an Option for You?

if you want something manual, simply run sleep 35m && systemctl suspend

You can replace 35m with another number, e.g 30m for 30 minutes, or 30s for 30 seconds.

Note that this will just count down, unless you stop it manually, even in the background and when you're using the PC. But I guess that's exactly what ya wanted :P

1 Like

Maybe the OP has to use sudo!

ZorinOS should have the correct permissions set up to not require sudo to suspend.

Either way there is multiple ideas that come to mind to give a sudo-password befor the 35m timer runs starts or have it accept a password automatically ($SUDO_ASKPASS magic)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.