Ubuntu – Way to disable Hibernate from within gconf-editor so button disappears

hibernate

There used to be a way to disable Hibernate from gconf-editor: apps -> gnome-power-manager -> can_hibernate. unticking "can_hibernate" would even remove the hibernate button from the shutdown menu.

This gconf option appears to no longer be present. Is there another way to disable hibernate and simultaneously remove the Hibernate button from the shutdown menu?

Best Answer

  1. Open a terminal and run the following command:

    gksu gedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy
    

    This opens up /usr/share/polkit-1/actions/org.freedesktop.upower.policy for editing.

  2. In the org.freedesktop.upower.hibernate section, changed the the line <allow_active>yes</allow_active> to <allow_active>no</allow_active>:

    enter image description here

  3. Restart indicator-session-service so for the change to take effect:

    killall indicator-session-service 
    

That's it, there should no longer be a Hibernate item in the session menu.

enter image description here