Can't shutdown/restart via GUI

Hey, newbie FreeBSD user here.

I finally got to successfully install FreeBSD, XFCE4, and XDM and to get the working properly (sort of). When I log in with my non-root user (who is a member of wheel and operator) I can't shutdown or restart via the GUI; though doing a [cmd=]shutdown -r now[/cmd] command does work in the terminal.

Any help to how I can make it so that I can do this via the GUI would be appreciated. Thanks!
 
The message that's displayed after x11-wm/xfce4-session is installed explains it:
Code:
To be able to shutdown or reboot your system, you'll have to add a .pkla file
in /usr/local/etc/polkit-1/localauthority/50-local.d directory. Which looks
like this (replace PUTYOURGROUPHERE by your group):

[Restart]
Identity=unix-group:PUTYOURGROUPHERE
Action=org.freedesktop.consolekit.system.restart
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Shutdown]
Identity=unix-group:PUTYOURGROUPHERE
Action=org.freedesktop.consolekit.system.stop
ResultAny=yes
ResultInactive=yes
ResultActive=yes
 
I added a .pkla in /usr/local/etc/polkit-1/localauthority/50-local.d and replaced my user group in the file. But the Shutdown and Reboot buttons are still inactive. Is there any setting I missed? I also tried to replace the groupname with "wheel" but the result is the same.
 
I use x11-wm/xfce4 as well, and noticed that suspend, restart, and shutdown buttons are greyed out on panel. So I took matters in my own hand and created a custon launcher in deskutils/cairo-dock and used these commands as needed:
Suspend: xfce4-terminal -x sudo apm -z
Reboot: xfce4-terminal -x sudo reboot
Shutdown: xfce4-terminal -x sudo poweroff
You can set custom icons to each and every time you click on the action you need, you'll get a terminal window and a password prompt.

PS: This might not be the best solution, but I personally don't waste time on little things like these as what I've done works perfect (for me at least).
 
Back
Top