MATE Why does Mate system menu not have the Shutdown and Restart items?

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?
 
I don't know Mate, but you don't need to log out to restart if Mate has the ability to run a terminal. You really should always have one open anyway - or at least have an OS or personally set up shortcut
 
I didn't think of that. :( ... seems I have some bad habits, though shutting down the GUI is not something I do every week. Actually, come to think of it, I guess I've just been lucky that the applications I use don't seem to care.
 
I do not use Mate, but I assume the message that appears when installing Xfce (x11-wm/xfce4-session to be exact) applies here :
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;
}
});
By the way, how do you start Mate (login manager, startx(1)) ?
 
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.

I had a similar problem with sddm and plasma5. You can check if consolekit is working correctly with 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.

This wasn't the case on my machine and I couldn't find any reason even after lots of debugging. But I found a workaround that "works for me": Kill the running 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.
 
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.
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.
 
MATE is innocent. You have probably something left to install. That's the dialogue I got after clicking on 'System'>'Shut down'
 

Attachments

  • Screenshot at 2019-05-21 19-48-16.png
    Screenshot at 2019-05-21 19-48-16.png
    214.2 KB · Views: 784
They aren't installed by default.
Are you sure ? sysutils/polkit is a library dependency of sysutils/mate-polkit which is a runtime dependency of x11/mate-base :
# 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

So I can for sure be wrong, but I don't see why. Could you shed some light on this ?

user00 could you tell us how you launch Mate (startx, Slim, etc.) and give us your .xinitrc file if relevant.
 
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.
 
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.
Your assumption that Polkit is related to systemd is wrong.
 
I ran into this problem when doing an upgrade from MATE 1.22.2 to 1.24.0. The "Shut Down" option disappeared after upgrading. To fix, I just reinstalled x11/mate-session-manager:

doas pkg install -f mate-session-manager

Rebooted and the shut down option was there again.
 
Back
Top