Xfce reboot/shutdown/suspend disabled


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.

About Eugen Mihailescu

Always looking to learn more about *nix world, about the fundamental concepts of arithmetic, algebra and geometry. I am also passionate about programming, database and systems administration.
This entry was posted in linux, X11, xfce and tagged , , . Bookmark the permalink.

2 Responses to Xfce reboot/shutdown/suspend disabled

  1. Thanks a lot ! You’ve save my life😉

  2. Thanks, this really made my day after toying around with policykit.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s