Add ‘Show Desktop’ button in Ubuntu 18.10, 18.04

October 26, 2018 — 10 Comments

gnome shell

This quick tutorial is going to show you how to add a ‘Show Desktop‘ icon into left dock launcher in Ubuntu 18.10 or Ubuntu 18.04.

The ‘Show Desktop‘ button was dropped since Ubuntu switched to Gnome 3 Desktop. To add it back, you can manually create show desktop shortcut icon and add it to panel (dock).

As you may know, the keyboard shortcuts Ctrl+Alt+d or Super+d do the function hide or show all opened app windows. And following steps will create a ‘show desktop’ shortcut icon simulates the keyboard press (Super+d) via xdotool.

NOTE that following steps don’t work on Wayland session, since xdotool simulates X11 keyboard/mouse input events.

1. Open terminal (Ctrl+Alt+T) and install xdotool:

sudo apt-get install xdotool

Type your user password (no asterisks feedback) when it prompts and hit Enter to continue.

2. Then create the show desktop shortcut icon and edit it via command:

gedit ~/.local/share/applications/show-desktop.desktop

When the file opens, paste following lines and save it.

[Desktop Entry]
Type=Application
Name=Show Desktop
Icon=desktop
Exec=xdotool key --clearmodifiers Super+d

3. Finally search for ‘show desktop’ in application menu, then right lick and select ‘add to favorites’:

That’s it. Enjoy!

I'm a freelance blogger who started using Ubuntu 5+ years ago and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me on Google Plus or email to ubuntuhandbook1@gmail.com

10 responses to Add ‘Show Desktop’ button in Ubuntu 18.10, 18.04

  1. Excellent, thanks!

  2. Thanks — I installed it in 18.10 and it works.
    At first it did not work. The button as written above emulates the keys Super+d, and Ubuntu18.10 uses Ctrl+Super+d by default. I looked up the keyboard shortcuts: Show Applications, Settings, Devices, Keyboard. Under “Hide all windows” the keyboard shortcut was Ctrl+Super+d. I clicked on the setting and changed it to Super+d to match with the new button. It now works fine.

  3. This worked great! Thanks so much!

  4. nice

    works great !!

  5. That was easy and worked perfectly . Thanks Bruh

  6. You are my hero! Thanks~

  7. Worked like a cham

  8. Lucy Dixon Hendry March 21, 2019 at 10:57 am

    Awesome. Worked like a charm.

  9. Is there a way to make it be the last button, at the bottom?

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*