These steps show how to add a ‘Show Desktop’ icon to the launcher in Ubuntu 18.04.
Previously this was a built in feature in Ubuntu, but was removed when the Gnome 3 interface was introduced.
Instead we need to install xdotool – a command line tool – and create a shortcut icon.
- Press Ctrl + Alt + T on your keyboard to open the terminal
- Run the following command to xdotool
sudo apt-get install xdotool
- When prompted, enter in the administrator password for the computer and follow the prompts
- Run the following command to create the command
- The file will automatically open. Paste the following into the file
[Desktop Entry] Type=Application Name=Show Desktop Icon=desktop Exec=xdotool key --clearmodifiers Super+d
- Close and save the file
- Click on the ‘Show Applications’ menu
- Search for ‘Show Desktop’
- Right-click and select ‘Add to Favorites’
TIP: Click and drag the icon to the desired location (the end of the launcher)
The OLD Ubuntu 16.04 way …
The following steps show how to add the Show Desktop icon to the launcher using Ubuntu 16.04.
- Click on the Ubuntu icon in the launcher
- Type ‘System Settings’ and click on the icon when it appears in the results
- Click on the ‘Appearance’ icon
- Click on the ‘Behaviour’ tab at the top of the window
- Tick the ‘Add show desktop icon to the launcher’ option
- Close the Window to save the changes.