By the way, how do you start Mate (login manager, startx(1)) ?To be able to shutdown or reboot your system, you'll have to add .rules
files in /usr/local/polkit-1/rules.d directory. Which looks
like this (replace PUTYOURGROUPHERE by your group):
polkit.addRule(function (action, subject) {
if ((action.id == "org.freedesktop.consolekit.system.restart" ||
action.id == "org.freedesktop.consolekit.system.stop")
&& subject.isInGroup("PUTYOURGROUPHERE")) {
return polkit.Result.YES;
}
});
For those who have working suspend/resume:
polkit.addRule(function (action, subject) {
if (action.id == "org.freedesktop.consolekit.system.suspend"
&& subject.isInGroup("PUTYOURGROUPHERE")) {
return polkit.Result.YES;
}
});
ck-list-sessions
from inside your running X-session. It should show only one session and have the properties active
and is-local
both TRUE
. console-kit-daemon
before the display manager starts. It will be automatically respawned and then it worked correctly for me. In my case, this worked by creating /etc/rc.conf.d/sddm with something like pkill console-kit-daemon
. Maybe a similar solution works for you.This is interesting. Normally, I don't use polkit on my computer. But this week-end, I set up a computer for my partner and I had the same issue : the ACTIVE property was showing FALSE. I did not have time to investigate further yet, but will do in the near future.In most cases, it shouldn't be necessary to add extra polkit rules, though. Shutdown and reboot are allowed for an active session on the local machine by default.
(...)
This wasn't the case on my machine and I couldn't find any reason even after lots of debugging.
You need sysutils/polkit and/or sysutils/mate-polkit.Is there a reason I have to log out in order to restart?
Or do any packages need to be installed in order for these items to appear?
They should be installed when installing x11/mate-base, so I assume those packages are already installed.You need sysutils/polkit and/or sysutils/mate-polkit.
Your assumption was wrong. They aren't installed by default.They should be installed when installing x11/mate-base, so I assume those packages are already installed.
Are you sure ? sysutils/polkit is a library dependency of sysutils/mate-polkit which is a runtime dependency of x11/mate-base :They aren't installed by default.
# pkg install -n mate-base | grep pol
libepoll-shim: 0.0.20181229
polkit: 0.114_2
mate-polkit: 1.20.1
policykit: 0.9_10
Your assumption that Polkit is related to systemd is wrong.There is no way in hell polkit makes it onto any of my systems. It was the reason why I wanted to migrate to FreeBSD from Linux.
Then use Lumina; ugly and unpolished but free of linuxismsThere is no way in hell polkit makes it onto any of my systems. It was the reason why I wanted to migrate to FreeBSD from Linux.
doas pkg install -f mate-session-manager