Can you add power off button while device suspended

I have a bad habbit that i sometimes leave my computer in suspended state while im asleep, and if someone in my family want to turn off the computer.. theres no power off button because it was suspended, its need to be unlock using password and the only option was suspending the computer again.. is there any ways to change that?

yes i know the only options is to hold down the power button and force shutdown but my family just think that can harm my computer

Don't you have a drop-down section in the top right corner of the standby screen where there's the option to shut down?

yes that drop down only show suspend option when computer is suspended, if the computer was logged out from the account then theres a shutdown and other option

Maybe you can set that the computer logs out instead of suspending, you can anyway set a password so no one else can access your computer, I set a password and only I can access my computer. Once it's in standby it requests the password immediately when trying to log in again, so this way I can also shut down.

1 Like

There's a bit of background work you'll need to do first to get this to work...

  1. install Nautilus-Admin
    sudo apt install nautilus-admin

  2. set up sudoedit
    The proper way to edit files as sudo

Now, open Nautilus, navigate to  Other Locations  >  Computer  >  etc  >  polkit-1  >  localauthority 

At this point, a dialog box will pop up asking for your password... that's Nautilus Admin granting you permissions to access the directory.

Now navigate to  50-local.d . It should show Folder is Empty.

Now follow the directions here:

Create a file named /etc/polkit-1/localauthority/50-local.d/allow_all_users_to_shutdown.pkla and edit it using sudoedit to look like this:

[Allow all users to shutdown]
Identity=unix-user:*
Action=org.freedesktop.consolekit.system.stop-multiple-users
ResultInactive=no
ResultActive=yes

Then create another .pkla file in the same directory. Use any name you like ending with .pkla, for example, allow_all_users_to_restart.pkla, and fill it with these contents:

[Allow all users to restart]
Identity=unix-user:*
Action=org.freedesktop.consolekit.system.restart-multiple-users
ResultInactive=no
ResultActive=yes

Now go to Zorin menu > Settings > Power, and set  Power Button Behavior  to Power Off.

Now, all they have to do is press the power button, and the machine should power off.

1 Like

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