Remove Suspend / Restart / Power Off... menu from Gnome Shell & GDM

Hi,

I need to remove Suspend / Restart / Power Off… menu from Gnome Shell & GDM.

Screenshot from 2022-12-11 13-47-28

I’ve been trying using Settings, Gnome Tweaks, Dconf Editor, but nothing found AFAIK.

Trying to enter the Polkit conf file gave the same results.

polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.login1.power-off" ||
        action.id == "org.freedesktop.login1.reboot" ||
        action.id == "org.freedesktop.login1.hibernate" ||
        action.id == "org.freedesktop.login1.suspend") {
        return polkit.Result.NO;
    }
});

Any clue?

Thank you,
Regards

Hello, this guide should help:

https://help.gnome.org/admin/system-admin-guide/stable/lockdown-logout.html.en

You will probably also want to mask ctrl-alt-del.target and set CtrlAltDelBurstAction=none in systemd too.

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