Sep 182011

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]

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

  8 Responses to “Removing Suspend and Hibernate from the gnome menu on RHEL-6”

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

    Purrfect. đŸ™‚

  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.

  3. i have tried this in my redhat 6.1,but it did not work.
    except for create this file,what should i do?

  4. Did you copy/paste the content? If not, make sure there is no typo. Is the file in the correct location? Try logging out/in.

  5. Agree with Yue. Didn’t work for me running 6.3.

  6. Got it working when I put it in a more appropriate place: /etc/polkit-1/localauthority/50-local.d/10-disable-suspend-hibernate.pkla

  7. On my RHEL 6.3 system, either location works. That is, the 10-disable-suspend-hibernate.pkla file can be either in /var/lib/polkit-1/localauthority/50-local.d/ or in /etc/polkit-1/localauthority/50-local.d/ .

    In the case of Fedora, it looks like they made a change that allowed reading from the /etc location in addition to /var/lib:
    (comment #43)

    So, this might hold true in RHEL/CentOS/SL as well.

  8. This still works. Thanks!

Sorry, the comment form is closed at this time.