How to remove Suspend and/or Hibernate buttons from the Quit menu

augusto_mint
  9 years ago
  7

I have had a lot of problems with the Suspend functions in my hardware, under Linux Mint 10 - Julia. As soon as the laptop comes from standby, it can't connect to the wireless network. I must shutdown it completely (not just restart) in order to boot and be able to reconnect gain.

So, I just don't use the Suspend option. However, since the last two times I had this problem I had clicked the Suspend button accidentaly, I looked for a way to remove that option from the Quit menu, in order to avoid further "accidents".

It's a simple and easily reversible process. In case you'd want to do it, this is how it can be done.

In the terminal use the following command:

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

This file includes a section for the Suspend option and another for the Hibernate option.

Just replace

<allow_active>yes</allow_active>

for

<allow_active>no</allow_active>

in the corresponding section.

Save the file and check the Quit menu. The options you've deactivated don't show up anymore. In my case, this prevents me to click the Suspend button accidentally. You can easily rollback this effect by undoing the changes in that file.
 

Comments
sunewbie 9 years ago

thanks for info.


efthialex 9 years ago

Nice tip. Thanks!


blueXrider 9 years ago

This also works for desktops that might be a finicky. Thanks for the info