When installing Gentoo with Xfce desktop environment it happens that Restart/Shutdown buttons are greyed when you are logged with a non-root user.
Searching many forums I found many "solutions" that didn't done the trick for me. But I also found the following article on Gentoo Forums: http://forums.gentoo.org/viewtopic-t-889144-start-0.html
By creating a file called /etc/polkit-1/localauthority/50-local.d/power.pkla with the following content:
[Local restart] Identity=unix-group:wheel Action=org.freedesktop.consolekit.system.restart ResultAny=yes ResultInactive=no ResultActive=yes [Local shutdown] Identity=unix-group:wheel Action=org.freedesktop.consolekit.system.stop ResultAny=yes ResultInactive=no ResultActive=yes [Local restart - multiple] Identity=unix-group:wheel Action=org.freedesktop.consolekit.system.restart-multiple-users ResultAny=yes ResultInactive=no ResultActive=yes [Local shutdown - multiple] Identity=unix-group:wheel Action=org.freedesktop.consolekit.system.stop-multiple-users ResultAny=yes ResultInactive=no ResultActive=yes
my Reboot/Shutdown buttons becomes instantly enabled and I was able from that point to restart/shutdown my system safely from desktop (instead from console with "sudo reboot" or something).
A second problem I have encountered was that suspend button shows an error message which said "not authorized". The problem is that we need to define a policy kit rule in the /etc/polkit-1/localauthority/50-local.d/upower.pkla file with the following content:
[Local Users] Identity=unix-group:power Action=org.freedesktop.upower.* ResultAny=yes ResultInactive=no ResultActive=yes
After that Suspend (to RAM) works like a charm.
Note: you can debug your system suspend/hibernate commands at a lower level by using the /sys/power/* files. Read more here.
Conclusion: first Xfce reboot shutdown suspend disabled now they are enabled ð
Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.