Shutdown Timer is a useful GNOME extension that lets you easily schedule automatic shutdown conveniently from the system tray menu.
Shutdown Timer should work in most GNOME-based Linux distros as in Ubuntu, Fedora, and Manjaro. When enabled, the extension adds an item in the system tray menu. You can specify after how long you want your computer to be shut down.
Installing Shutdown Timer in Ubuntu, Fedora, and Manjaro
Step 1) You should have GNOME shell extensions enabled on your computer for being able to install the GNOME extensions. Follow our step-by-step guide. Note that though the manual says Ubuntu 17.10, it should work in on Fedora and Manjaro GNOME too.
Step 2) Go to the Shutdown Timer extension webpage and turn on the slider. Note that the GNOME extensions only work with Firefox and Chrome/Chromium browser.
Shutdown Timer GNOME extension
Step 3) Turn ON the extension and complete the installation.
Step 4) You should immediately see a new option added to the status bar. Drag the slider to adjust the time.
By default settings, the extension initiates the shutdown action, which pops-up power options dialog box with three options, including “Cancel,” “Restart,” and “Shutdown” with the 30 seconds countdown. If the monitor turns off while the shutdown timer is running, then the default timer in rootless mode gets interrupted.
Therefore, I suggest using a pkexec shutdown where you need to enter the root password to make sure that the shutdown will be executed. Click on the gear icon within the Shutdown Timer area turn on the “Root mode.”
That’s it! I hope you find the extension useful. If you ever wanted to disable it, go to the installed extensions page and turn it off.