Xfce Forum

Sub domains

You are not logged in.

#1 2012-11-16 14:58:26

Registered: 2012-11-16
Posts: 2

How to remove Restart/ Shutdown/Suspend Hibernate button- applet from

How to remove Restart/ Shutdown/Suspend Hibernate  button- applet from the user's menu.

When I goto logout, I see these other buttons users can run.  I want to make sure they cannot restart/shutdown/suspend/hibernate the system.




#2 2012-11-16 20:12:55

Registered: 2012-09-14
Posts: 13

Re: How to remove Restart/ Shutdown/Suspend Hibernate button- applet from

if you remove that user from power group... he/she wont be able to suspend/hibernate .. not sure how to remove restart and shutdown... try removing the user from the wheel group maybe that might work.


#3 2012-11-17 15:52:53

Registered: 2012-11-17
Posts: 9

Re: How to remove Restart/ Shutdown/Suspend Hibernate button- applet from

I suppose it depends on what toolkit is handling the priviledges. For example, I'm using PolicyKit. To disable suspend, hibernate, restart and powering off, I edited the files in
for reboot and powering off and
for suspend and hbernate.

Changing the permissions from




under the relevant field totally disables the function to suspend, hibernate etc... but changing it to


Will prompt the user for admin password when the options are selected.

Additional rules may be defined in the rules.d folder under /usr/share/polkit-1 or /etc/polkit-1 though, so those may affect the behaviour as well.

I apologize in advanced if the information may not be useful depending on your system setup. I'm running Arch Linux and referring heavily to https://wiki.archlinux.org/index.php/PolicyKit

Edit: Code tags

Last edited by YJLee (2012-11-20 02:07:00)


#4 2012-11-19 12:56:56

Registered: 2012-11-16
Posts: 2

Re: How to remove Restart/ Shutdown/Suspend Hibernate button- applet from

Thanks for the feedback.  I was looking for how to only display the logout button instead of showing the restart/hibernate/shutdown/suspend.

So far I'm able to restart the workstation.(I read that use would need SUDO rights.)
I'm not using any type of policykit that I know of.   Running on Redhat 5.8



#5 2012-11-20 03:51:36

Registered: 2012-10-24
Posts: 3

Re: How to remove Restart/ Shutdown/Suspend Hibernate button- applet from

The polkit settings depend on whether you're using >107 or <106 since in 107 all the configuration was changed so it was done in javascript (It's a mess, I'll never understand that change, but nevertheless...). The changes YJLee posted may work if you're using 106 or under though.

The program 'xfce-session-logout' displays the normal logout box, so options include modifying the source to this package and recompiling it for your system, or replacing the actual xfce-session-logout with a script that sends the real binary the '-l' parameter which tells xfce-session-logout to logout without displaying any prompt.

That solution is the most hacky (And not recommended, you'll have to keep in mind that if an update happens that updates the xfce4-session-logout binary, this change will be reverted) but it should cover all cases for logging out the normal way in Xfce. This will make it basically impossible to suspend/reboot/shutdown from XFCE though, you'd have to do it through other means such as a terminal.

It should be noted, while these will prevent someone from doing it via the Xfce menu, there isn't much to prevent a user from doing so via terminal or something similar (Or calling the command directly via the terminal). Editing polkit to not allow normal users to poweroff the system is really the best option, but with the new changes to polkit >107 it may be a bit annoying to do.

Hope that helps,



#6 2012-12-15 19:45:57

Registered: 2012-12-11
Posts: 5

Re: How to remove Restart/ Shutdown/Suspend Hibernate button- applet from

This removes any capability to access a logout/shutdown/restart/sleep option. This may work:

1. Right click on the application menu in your panel. On my setup it's either an Ubuntu symbol or a Mouse.
2. Click Properties
3. Right here you could use a custom menu under Use custom menu file but for now click Edit Menu.
4. Collapse every item in the tree on the left of the window. There should be only one left. In my case it is UbuntuStudio.
5. The right pain at the bottom should have a checkmark for "Log Out". Uncheck it.

Next, we're going to add an ability to log out:

1. Right click on the panel that you want a logout button to be placed.
2. Click Add New Items
3. Click on Action Buttons.
4. Click Add.
5. Click Close.
6. Right click on the Action Button that was just added. For me it is my current login.
7. Click Properties.
8. Under Appearance drop-down-box select Action Buttons.
9. Uncheck what you don't want to be displayed.
10. And also uncheck the "Log Out...". It's the one with dot dot dot. This disables the log out Menu.
11. Check the one "Log Out"
12. Click Close.

Now we're going to remove the Application Menu:

1. Right click on the Application Menu in the panel and select Remove.

Hopefully I didn't leave any steps out, but this is the basic idea.


Board footer

Powered by FluxBB