Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Nov 16 '11 at 4:18

This question came from our site for professional and enthusiast programmers.

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.

share|improve this answer

Your Answer


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