This simple tutorial is going to show you how to add ‘Show Desktop’ icon to Unity Launcher so that you can quickly minimize all opened windows to view the desktop. I’ll show you how to do it in two ways.
Add ‘Show Desktop’ to Unity Launcher using MyUnity in Ubuntu 12.04:
MyUnity is a Unity Desktop configuring tool, it has the ability to add ‘Show Desktop’ icon to the Unity Launcher (MyUnity -> desktop -> turn on Active ‘Show Desktop’ icon).
MyUnity is available in Ubuntu Software Center, so you don’t have to do anything special to install it. Just search for and install the MyUnity package.
Add ‘Show Desktop’ icon in Ubuntu 12.10 Quantal:
For some reason, MyUnity is not available in Ubuntu 12.10. So here’s the easiest way to add ‘Show Desktop’ icon without installing a tool.
1.) Open dconf Editor from the Unity Dash Home.
2.) Navigate to com -> canonical -> unity -> launcher
3.) In right, add ‘unity://desktop-icon’ (with the quotes) into the value of favourates.
Now you’ll see the Show Desktop icon in Unity Launcher. You can drag and drop to change its location.
Manual Way to Add ‘Show Desktop’ icon to Unity Launcher:
For now, Ubuntu 12.10 is still in beta release and MyUnity is not available yet. So you can do this work in manual way.
1. Hit Ctrl+Alt+T to open up a terminal window, copy and paste this command into terminal and hit enter to install xdotool (install it using Ubuntu Software Center if you prefer graphical way):
sudo apt-get install xdotool
2. Create and edit file ‘/usr/bin/showdesktop’ (For graphical way, run gksudo nautilus command to open file browser with root privilege, then file system->usr/bin/ -> create file):
sudo gedit /usr/bin/showdesktop
Copy and paste following lines into the file and save it.
xdotool key ctrl+super+d
3. Give it executable permission (Right-click -> Properties -> Permission -> Allow executing as a program).
sudo chmod +x /usr/bin/showdesktop
4. Now Create a new document on Home Folder, copy and paste following into it and save.
Then name it to show-desktop.desktop.
5. Drag and drop show-desktop.desktop onto the Unity Launcher, and you’ll get the “Show Desktop” icon.