s32. Enable shutdown option via policykit

To enable a given user account to shutdown and reboot in Mate or XFCE, add

# sudo nano /usr/local/etc/polkit-1/rules.d/51.restart-shutdown.rules

polkit.addRule(function (action, subject) {
  if ((action.id == "org.freedesktop.consolekit.system.restart" ||
      action.id == "org.freedesktop.consolekit.system.stop")
      && subject.isInGroup("priyadarshan")) {
    return polkit.Result.YES;
  }
});

# In case of laptop with working suspen/resume

polkit.addRule(function (action, subject) {
		   if (action.id == "org.freedesktop.consolekit.system.suspend"
      && subject.isInGroup("priyadarshan")) {
    return polkit.Result.YES;
  }
});


[s32.Read