[HOWTO] Disable suspend

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

[HOWTO] Disable suspend

Postby magia » May 30th, '13, 16:58

To disable suspend function and hide Suspend entry from the KDE Leave menu, create /etc/polkit-1/rules.d/99-disable-suspend.rules with these lines:

Code: Select all
// Disable suspend for all users
polkit.addRule(function(action, subject) {
   if ((action.id == "org.freedesktop.login1.suspend")) {
      return polkit.Result.NO;
   }
});
polkit.addRule(function(action, subject) {
   if ((action.id == "org.freedesktop.login1.suspend-multiple-sessions")) {
      return polkit.Result.NO;
   }
});


Note: This howto is added to the Mageia Wiki.
magia
 
Posts: 3
Joined: May 30th, '13, 15:21

Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 1 guest

cron