canonical / lightdm

Display Manager
GNU General Public License v3.0
827 stars 138 forks source link

Cannot enable Reboot and Shutdown buttons #366

Open ant-222 opened 3 months ago

ant-222 commented 3 months ago

Hello,

I am trying to activate the Shutdown and Reset button in lightdm v. 1.32.0_5 on FreeBSD 14.1. The package description for xfce4-session says that I should add certain JavaScript rules to polkit. I added the follwing:

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

to my /usr/local/etc/polkit-1/rules.d yet no Shutdown or Restart buttons appeard in the Start menu. My user is in the video group, so that lightdm works and autologin works. I have tried the same thing without the group condition, but in vain:

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

Here is my lightdm.log, in case it can help. Can you plese help me troubleshoot this error, if it is related to lightdm? Here is my lightdm.conf.

dmesg and /var/log/messages gives nothing interesting about with lightdm or session. In my PAM rules for lightdm-autologin and lightdm-greeter I commented the line: auth pam_env.so since PAM does not find this module on my system: lightdm[1464]: in openpam_load_module(): no pam_env.so found Can this be a problem?