Removing Suspend and Hibernate from the gnome menu on RHEL-6

Sep 18th, 2011

I wrote about how to get rid of the “Suspend” option from gnome’s system menu on RHEL/SL/CentOS-5 in my earlier blog. On RHEL-6, “Suspend” and “Hibernate” are now found under “Shutdown” in the “System” menu in gnome.

To remove these options from the list of available actions, create a PolicyKit file named 10-disable-suspend-hibernate.pkla (for example) with the following contents:

[Disable suspend]
Identity=unix-group:*
Action=org.freedesktop.devicekit.power.suspend;org.freedesktop.devicekit.power.hibernate
ResultAny=no
ResultInactive=no
ResultActive=no

and save it in the /var/lib/polkit-1/localauthority/50-local.d directory.

  1. burakkucat
    Sep 20th, 2011 at 09:37
    Reply | Quote | #1

    Thank you for publishing this information. It allows me to do exactly what I have been searching for.

    Purrfect. :)

  2. zxq9
    Apr 4th, 2012 at 07:49
    Reply | Quote | #2

    I’ve been seriously contemplating putting the effort in to package the latest KDE for SL (not sure if I can work it into EPEL directly, though) and this is definitely something that needs to happen on that end as well. Suspend/hibernate are still tricky options and in production can be downright dangerous. The same can be said for power management that kills your screen after 30 minutes by default, and sometimes this is unrecoverable.