(This is not a question, I’m merely documenting this here in case I or someone else needs this info in the future.)
Default behavior in openSUSE Tumbleweed is to not let users suspend the machine from the lock screen when someone’s logged in.
This security policy can be controlled from polkit.
- As per the comment in
/usr/etc/polkit-default-privs/local.template
, create a file called/etc/polkit-default-privs/local
. This file contains overrides of default system policies. - Add the following line:
org.freedesktop.login1.suspend auth_admin_keep:yes:yes
- Run
sudo set_polkit_default_privs
to apply the policy and reboot for it to take effect.
This was tested in a GNOME environment. For documentation on what the above values mean, see man polkit-default-privs
and polkit - ArchWiki. The org.freedesktop.login1.suspend
action is defined in /usr/share/polkit-1/actions/org.freedesktop.login1.policy
.