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 would like to have a "Show desktop" icon in my launcher. I've seen that there are already some threads about this issue but none of them solve the problem for Unity 2D (which I'm forced to use), alrady tried MyUnity or ccsm.

Is there a way to do it? Thanks in advance.

share|improve this question
up vote 1 down vote accepted

You can do this with a little script and a .desktop file.

  1. Instal wmctrl
    sudo apt-get install wmctrl
  2. Create a little script, open gedit and write this: enter image description here
  3. Save the script eg:
    in your home as ""
  4. Make the script executable
    with chmod 764 /home/"user"/ or
    chmod +x /home/"user"/
  5. Now you can creat a desktop file to call the script. In the terminal type:
    sudo gedit /usr/share/applications/show-desktop.desktop
  6. Add the info.
    here you have an example: enter image description here (Feel fre to change any data in the file)
  7. Go to the dash and serch for "Show Desktop" enter image description here

  8. Drag and drop the icon into the Launcher

The credit for the script if for Webupd8 , there is this "wmctrl" script for "docky", you can use it for unity launcher.


share|improve this answer
Works like a charm! Thanks for the detailed explanation. – Gian Luca Scoccia Nov 26 '12 at 9:15

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.