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 know about the show desktop keybind (default Ctrl+Alt+D), which I use often enough. However, I'm looking for a way to minimize all windows without activating "show desktop".

I'm on a default install (i.e Gnome, Metacity & Compiz). I've looked through all the locations to configure keybinds, that I know. I've also looked at the default keybind list in the Ubuntu wiki and in the Compiz wiki. (Not to mention, searching here.)

I'm interested in knowing where it is available, if not in Gnome/Metacity/Compiz, or some other way to accomplish this with a keybind.

share|improve this question
up vote 8 down vote accepted

This person found a way to do what you are looking for:

  1. First install devilspieInstall devilspie

  2. Then create a file called minimize.ds in your home folder. In that file put the following:


    Test it out by running: devilspie minimize.ds

  3. If it works as it should then add a shortcut: System ➜ Preferences ➜ Keyboard Shortcuts.

    Click on the Add button and fill in the fields as shown below, replacing YOURUSERNAME with your actual username.

    And finally double-click where it says Disabled and press your shortcut keys.

    alt text

share|improve this answer
Yes! That's exactly what I want. This way, I can use both bits of functionality and they work as I expect. – George Marian Nov 17 '10 at 19:16

It can be found in System--->Preferences--->Keyboard shortcuts

alt text

share|improve this answer

Ctrl+Alt+D? You can set it in Gnome System->Preferences

share|improve this answer
I know about that keybind and use it often enough. However, that is not what I want. Because of the way I use a GUI environment, I want a way to minimize all windows w/o it being a toggle. Here's my use case: I hit the key bind, then I bring up several windows, then sometime later I hit the keybind again. With a toggle, that's all sorts of wrong. The toggle is fine for quick access to the desktop, but that is not what I need. I need to minimize all windows without having to do it manually for each window. – George Marian Nov 17 '10 at 17:50
Actually, that's "Show Desktop" rather than "Minimize all windows". And it does toggle. – Mussnoon Nov 17 '10 at 17:51

Try using wmctrl.

sudo apt-get install wmctrl

Then, create a new custom shortcut that executes the following command.

wmctrl -k on

This should do what you are looking for.

share|improve this answer
That just activates show desktop, which the OP does not want. – Alvin Row Nov 17 '10 at 18:41
@dor Correct. However, it sort of answers the question as I asked it originally. I.e. without a toggle. Roland's edit clarified that point just after this answer was posted. So, while it is not what I want, it is getting closer. At the very least, this provides a way to minimize the windows with one keybind that doesn't toggle. The interaction between this and the show desktop toggle is odd, but barring another solution it may have to do. – George Marian Nov 17 '10 at 18:59
I don't see the difference between this and what DoR proposes regarding your use case in Pawel's solution, but I'm glad you found what you were looking for. Cheers. – Ramón Nov 17 '10 at 20:52
Basically, using show desktop minimizes windows and remembers which windows were minimized. Those windows are restored on the next use of show desktop. (I.e. it works like a toggle) That's not the same notion as simply minimizing all windows. This way, the two keybinds don't seem to interact. That is, I can minimize all, then press show desktop and nothing happens. Using wmctrl would restore those windows if I then pressed show desktop. Regardless, I do appreciate the effort and you did teach me something useful. So, +1 for that. – George Marian Nov 17 '10 at 21:47
Aha, I see the difference now. Thanks for explanation. – Ramón Nov 18 '10 at 5:48

This is built into Ubuntu Settings.

Go to: Settings > System Settings > Shortcuts and Gestures > Global Keyboard Shortcuts > Select 'KWin' in KDE Component pull-down menu > Then scroll down to 'Show Desktop' > Assign a custom hotkey. Presto!

share|improve this answer
If you read the original question and most of the answers, they relate, not to KDE, but to GNOME. – user25656 Jan 15 '13 at 18:22

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.