Ubuntu – How to change what action is caused when the power button is pressed

key-bindingpower-management

I want know if there's a way to change the action when the power key is pressed. I use Ubuntu 11.10 and when it is pressed it opens a small window with shutdown options. I want know how to change this, and make it open anything else. Is there a way to do that? And how?

Best Answer

You can change the action that happens when pressing the power button by entering this command into a terminal:

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

replace the 'hibernate' with the action you want.

Also take a look at this duplicate post for more information.