How to fix gnome’s ignored hibernation button (while running chrome)

Since some version of gnome or chrome the developers decided you should not be able to shutdown or hibernate your machine anymore, when chrome is currently running (doesnt matter if video is or was playing or not).

Easy workaround: Make the decision based on user groups instead:

sudo nano /etc/polkit-1/rules.d/49-ignore-inhibitors.rules

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") &&
        subject.isInGroup("sudo")
    ) {
        return polkit.Result.YES;
    }
});


Beitrag veröffentlicht

in

von

Schlagwörter:

Kommentare

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert