Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a "power button" on my keyboard that enables standby or hibernate. I can't find the mapping of this key anywhere in "sytem settings>Keyboard", "system>power management", "compiz config> or similar (where I could find it before unity). How can I disable (not remap) this button?

I do not want to disable hibernate/sleep altogether, it's simply this key that gets pressed a lot by accident and it's getting quite annoying.

share|improve this question
1  
Try a chisel and a pair of pliers. – Mike Scott Mar 23 '12 at 10:14
1  
I was asking about this on the forum and annoyingly still have no answer. The GUI setting disappeared with the move to GTK3. – edm Mar 23 '12 at 12:05
Remove the key from keyboard with a pencil. (Don't do that, just a joke until final answer arrises...=) But I made it in some strange work situations... Just put the key back in when you done! Don't break keyboards! – H_7 Mar 23 '12 at 12:10

2 Answers

up vote 14 down vote accepted

Disable the suspend button in your system

gsettings set org.gnome.settings-daemon.plugins.power button-suspend "nothing"

Revert to the default value

gsettings set org.gnome.settings-daemon.plugins.power button-suspend "suspend"

Disable the sleep button in your system

gsettings set org.gnome.settings-daemon.plugins.power button-sleep "nothing"

Revert to the default value

gsettings set org.gnome.settings-daemon.plugins.power button-sleep "hibernate"

Disable the hibernate button in your system

gsettings set org.gnome.settings-daemon.plugins.power button-hibernate "nothing"

Revert to the default value

gsettings set org.gnome.settings-daemon.plugins.power button-hibernate "hibernate"

Settings those options above does not disable the functions in your system, you can still use the cog wheel menu to hibernate / suspend, this only disables keyboard and other buttons you might have in your computer.

share|improve this answer
I filed a bug against ubuntu gnome-control-center keyboard shortcuts GUI. It should manage these buttons like other keyboard buttons: bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/… – Stephen Ostermiller Nov 15 '12 at 14:02
+1 Works like a charm, thanks! – Lukas Stejskal Feb 2 at 11:46

Dconf Editor is the recommend replacment to gconf editor for Unity. You can get dconf in the software center or by typing sudo apt-get install dconf-tools in the terminal.

With Dconf editor, navigate to org gnome settings-daemon plugins power. There you can change what the sleep button does, as well as many other buttons on your keyboard.

enter image description here

share|improve this answer
+1, essentially the GUI version of the accepted answer :), thanks – KillianDS Mar 24 '12 at 19:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.