I'm trying Gnome Shell, after moving over from Unity. In Unity, I'd press ctrl+w to close the current tab, and alt+F4 to close the current window (e.g. in gedit and Firefox).

Now, in Gnome Shell, ctrl+w is closing the current window instead, and alt+F4 does nothing. I've checked the menu of Firefox, and it says File > Close Tab is ctrl+w as expected. Selecting this item works also.

When I right click my menubar, the minimise/maximise popup menu appears. The last menu-item is "Close", with the associated keyboard shortcut of ctrl+w. Presumably this overrides the application-specific "Close tab" shortcut. I checked System Settings > Keyboard > Shortcuts and "Close Window" was set to "Disabled", so I'm not sure what's going on there...

How can I restore the expected behaviour?


1 Answer 1


Open a terminal with Ctrl-Alt-T keyboard shortcut and try executing this command to fix the problem:

 gsettings set org.gnome.desktop.wm.keybindings close "['<Alt>F4']"

This command will set Alt-F4 as the default binding for closing the window. Then you should use the regular Ctrl-W to close tabs.

After the command, try testing it. Hope this will help

  • Brilliant! In retrospect, I must have changed that in dconf at some stage when messing around in Unity (it was set to ctrl-w). I'm always confused as to why there are multiple places to define keyboard shortcuts (e.g. system settings, dconf, ccsm). Thanks again!
    – Sparhawk
    Sep 15, 2012 at 7:07
  • @Sparhawk glad to help you. You can also use dconf-editor, but i avoided that for simplicity.
    – Anwar
    Sep 15, 2012 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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