How can I disable the hibernate key?

Asked by Jerry Story

Is there such a thing as disabling a key?

For example I would like to disable the hibernate key on my HP Pavilion keyboard, because it causes the computer to go to sleep and then I can't wake it up except by rebooting. It's too easy to press that key accidentally.

Alternatively, could the hibernate key be made to work like a different key? Something harmless, like for example the ESC key.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Wrwrwr
Solved:
Last query:
Last reply:
Revision history for this message
D.V.S. Phanindra (dvsphanindra) said :
#1

Hmm partly yes, you can always do that. Try changing the power options in power management. You can find it in preferences menu in the 'System' menu. You can set the option to 'Ask for confirmation' or 'Do nothing' when you 'Press your power key'. The restart-shutdown-hibernate screen would open up if you set it to 'Ask for confirmation' -which I always use. 'Do nothing' will simply disable the key. But you cannot change the functioning of the key (I have never tried it -may be you can do so by changing the shortcuts in the shortcuts list in the same menu).

Revision history for this message
Jerry Story (story-jerry) said :
#2

On 9/23/07, D.V.S. Phanindra <email address hidden> wrote:
> Your question #13896 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/13896
>
> Status: Open => Answered
>
> D.V.S. Phanindra proposed the following answer:
> Hmm partly yes, you can always do that. Try changing the power options
> in power management. You can find it in preferences menu in the 'System'
> menu. You can set the option to 'Ask for confirmation' or 'Do nothing'
> when you 'Press your power key'. The restart-shutdown-hibernate screen
> would open up if you set it to 'Ask for confirmation' -which I always
> use. 'Do nothing' will simply disable the key. But you cannot change the
> functioning of the key (I have never tried it -may be you can do so by
> changing the shortcuts in the shortcuts list in the same menu).

In the program 'Power Management Preferences' -> General -> 'When the
power button is pressed', the options are:
Ask me
Suspend
Hibernate
Shut down

It is set to 'Ask me'.

The hibernate key stops the computer and I can't wake it up except by
a cold reboot.

Revision history for this message
Best Wrwrwr (wrwrwr) said :
#3

There's a System-->Preferences-->Keyboard panel for configuring different things about keyboard. But i can't disable any of my special keys there, maybe you'll have more luck.

Nevertheless, you can disable hibernate/suspend all together. Assuming you use gnome, run "gconf-editor" from terminal (maybe you'll have to install it first), navigate to apps-->gnome-power-manager-->general and uncheck can_hibernate, can_suspend.

Revision history for this message
Jerry Story (story-jerry) said :
#4

Thanks Wrwrwr, that solved my question.

Revision history for this message
Jerry Story (story-jerry) said :
#5

On 9/24/07, Wrwrwr <email address hidden> wrote:
> Your question #13896 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/13896
>
> Status: Open => Answered
>
> Wrwrwr proposed the following answer:
> There's a System-->Preferences-->Keyboard panel for configuring
> different things about keyboard. But i can't disable any of my special
> keys there, maybe you'll have more luck.
>
> Nevertheless, you can disable hibernate/suspend all together. Assuming
> you use gnome, run "gconf-editor" from terminal (maybe you'll have to
> install it first), navigate to apps-->gnome-power-manager-->general and
> uncheck can_hibernate, can_suspend.

That worked. Thanks.

Revision history for this message
scottmuz (semurray) said :
#6

You can dstop the hibernate and suspend keys showing using
gconf-editor
and going to the path
apps/gnome-power-manager/general
and deselecting can_suspend and can_hibernate.