Solved Can't shutdown and reboot using graphical interface

  • Thread starter Deleted member 63539
  • Start date
D

Deleted member 63539

Guest
I already followed the guide of pkg -D xfce4-session but it doesn't work. The shutdown and reboot buttons are still greyed out.

I don't use any login manager but startx manually.

My .xinitrc:

exec startxfce4 --with-ck-launch-session --dbus-launch --exit-with-session

My polkit rules:

/usr/local/etc/polkit-1/rules.d/51-gh.rules

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

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

SirDice

Administrator
Staff member
Administrator
Moderator
My .xinitrc:

exec startxfce4 --with-ck-launch-session --dbus-launch --exit-with-session
That doesn't look right to me. Where did you get this from? Try this instead:
Code:
exec dbus-launch --exit-with-session ck-launch-session startxfce4

And make sure dbus_enable="YES" is in rc.conf and the DBus service is running.
 
OP
D

Deleted member 63539

Guest
SirDice Thank you. Your command worked for me without setting any polkit rules at all :)
 
Top