Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How do I allow shutdown for normal users in xfce?

Currently, the log-out/restart/shutdown box only allows the log-out option, and having to switch to the console, logging in as root and shutting down from there is always a bit annoying.

share|improve this question
add comment

2 Answers 2

Just as zebonaut said, most Linux distributions should ship a group called power or powerdev that has the permission to, well, control the system power. Just as you have a group audio or audiodev with access to the audio devices and netdev for network devices, plugdev, scanner - you see the pattern.

Note that to see the changes take effect, you may need to log out and log in again. Group permissions are usually applied at login time.

Adding users to these groups will allow them to perform the shutdown action.

share|improve this answer
add comment
up vote 2 down vote accepted

The xfce wiki offers a number of different solutions. The one I prefer uses hal and dbus.

Step 1: Find out how the user group for all things power is called in your distribution. Quoting the wiki:

Your /etc/dbus-1/system.d/hal.conf should contain a section similar to this:

<policy group="power">
  <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
  ...
</policy>

Here, the user group is called power. On my debian installation, I found it is called powerdev.

Step 2: Again, from the wiki:

Add the user to the power group (root):

gpasswd -a <username> power

When you logout and login again, the shutdown and restart buttons should be sensitive. Note: Reboot or restart of the deamons required; just logging out to the xdm login screen is not sufficient.


Edit: The solution above didn't work on a fresh install. The following trick worked (Source):

Create /etc/polkit-1/localauthority/50-local.d/shutdownreboot.pkla and add the following:

[restart]
Identity=unix-user:*
Action=org.freedesktop.consolekit.system.restart
ResultAny=yes

[stop]
Identity=unix-user:*
Action=org.freedesktop.consolekit.system.stop
ResultAny=yes
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.