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 to change the "Close Window" shortcut to Ctrl+Q as this is more intuitive to me than the default Alt+F4. Prior to 12.04 upgrade, I was just able to change this via the settings window, but in 12.04 when I try to set it as Ctrl+Q by pressing the keys for the settings manager to capture, it just closes the window and doesn't set the shortcut.

I have had a look through gconf-editor, but can't seem to find anything. Is there any way to manually set the shortcut key?


share|improve this question
up vote 0 down vote accepted

The reason it doesn't work when trying to set '+q' is because that combination is set for closing System Settings window. I would advise on not changing the keybinding for closing windows to '+q' as it should work for almost every application you open (I tried it on a few applications myself and it worked without me binding the keys to it).

If you still want to change it, I found this command to work the best:

gconftool-2 -s /apps/metacity/window_keybindings/close -t string "<keybinding here>"

For example, if you wish to change the close binding to control+q, then you would do the following:

gconftool-2 -s /apps/metacity/window_keybindings/close -t string "<Control>q"

Go into System Settings >> Keyboard >> Shortcuts and look for the 'Window Close' binding which should now read Ctrl+Q

Hope this helps.

share|improve this answer
Thanks, this worked perfectly :) – hashi May 2 '12 at 0:19
You are welcome :D – ruffEdgz May 2 '12 at 14:08

Your Answer


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.