[HOWTO] Disable hibernate

To disable hibernate function and hide Hibernation entry from the KDE Leave menu, create /etc/polkit-1/rules.d/99-disable-hibernate.rules with these lines:
Note: This howto is added to the Mageia Wiki.
- Code: Select all
// Disable hibernate for all users
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.login1.hibernate")) {
return polkit.Result.NO;
}
});
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.login1.hibernate-multiple-sessions")) {
return polkit.Result.NO;
}
});
Note: This howto is added to the Mageia Wiki.