Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer

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 "show_desktop.sh"
  4. Make the script executable
    with chmod 764 /home/"user"/show_desktop.sh or
    chmod +x /home/"user"/show_desktop.sh
  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.

Cheers.

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

Your Answer

 
discard

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.