Please note that this blog has been moved.
Now it has its own domain: mynixworld.info🙂
If you want to read the latest version of this article (recommended) please click here and I open the page for you.
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.