Page 1 of 1

[HOWTO] Disable hibernate

PostPosted: May 30th, '13, 16:55
by magia
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:

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.