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

user00

Member

Reaction score: 1
Messages: 79

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?
 

OJ

Daemon

Reaction score: 353
Messages: 1,210

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
 
OP
OP
U

user00

Member

Reaction score: 1
Messages: 79

well, obvious things occur to me too. the difference being, graceful shutdown of Mate saves the loaded applications, while CLI shutdown does not.
 
  • Thanks
Reactions: OJ

OJ

Daemon

Reaction score: 353
Messages: 1,210

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.
 

Phishfry

Son of Beastie

Reaction score: 1,402
Messages: 4,125

You have to enable dbus to see the shutdown menu buttons.
/etc/rc.conf
Code:
dbus_enable="YES"
 

hukadan

Well-Known Member

Reaction score: 280
Messages: 438

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)) ?
 

Zirias

Aspiring Daemon

Reaction score: 218
Messages: 602

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.
 
  • Thanks
Reactions: OJ

hukadan

Well-Known Member

Reaction score: 280
Messages: 438

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.
 

hukadan

Well-Known Member

Reaction score: 280
Messages: 438

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.
 
OP
OP
U

user00

Member

Reaction score: 1
Messages: 79

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.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,683
Messages: 30,622

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.
 
Top