Solved Shutdown and restart menu entries don't appear

Hello,
I've found many topics in this forum that solves this issue, but I can't get the shutdown and restart menu entries to appear on MATE with the Slim login manager. My user belongs to the following groups:
Code:
$ groups
blervawa operator
Adding myself to the operator or wheel group doesn't fix anything. I would like to shutdown the system from the desktop environment, not through the /sbin/shutdown command.

I tried to create a file, /usr/local/etc/polkit-1/localauthority/50-local.d/org.freedesktop.consolekit.pkla, with the following content:
Code:
[Restart]
Identity=unix-group:blervawa
Action=org.freedesktop.consolekit.system.restart
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Shutdown]
Identity=unix-group:blervawa
Action=org.freedesktop.consolekit.system.stop
ResultAny=yes
ResultInactive=yes
ResultActive=yes

I also tried adding the following to the /usr/local/etc/PolicyKit/PolicyKit.conf file:
Code:
<match action="org.freedesktop.hal.power-management.shutdown">
    <match group="blervawa">
        <return result="yes"/>
    </match>
</match>
<match action="org.freedesktop.hal.power-management.reboot">
    <match group="blervawa">
        <return result="yes"/>
    </match>
</match>

But none of these methods worked. This is my /etc/rc.conf file (the VirtualBox lines are intentional, it's installed as a VirtualBox guest):
Code:
clear_tmp_enable="YES"
syslogd_flags="-ss"
sendmail_enable="NONE"
hostname="freebsd"
keymap="es.acc.kbd"
ifconfig_em0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
dbus_enable="YES"
hald_enable="YES"
slim_enable="YES"
vboxguest_enable="YES"
vboxservice_enable="YES"
vboxservice_flags="--disable-timesync"
And this is my ~/.xinitrc file:
Code:
export LANG=es_ES.UTF-8
exec /usr/local/bin/ck-launch-session mate-session
exec mate-session doesn't work either.

How can I enable the shutdown and reboot menu entries?
I'm using FreeBSD 12.1-RELEASE under amd64 architecture, and the MATE version is 1.22.2
Thanks in advance.
 
I've finally been able to make them appear, by editing the policies in the /usr/local/share/polkit-1/actions/org.freedesktop.consolekit.policy file.

Anyway, thanks for your help freebsd_noob
 
I thought this would be useful for future readers who also have this issue and can't find any solution that works. The menu entries don't appear when using the Slim greeter, but I tried using another greeter like LightDM and the buttons appear without having to configure anything.
Using LightDM also makes the "Switch user" option available, unlike when using Slim (maybe Slim needs to be configured for it to appear, too).
 
Back
Top