“Show Desktop” widget not working properly on KDE/Kubuntu 16.10 – Fix it

Show Desktop widget

Kubuntu has been my favorite distro ever since I made the move from Windows to Linux. KDE feels very stable and a swift desktop environment. However KDE has its own set of problems. Ever since the introduction of Plasma 5, everytime I would upgrade Kubuntu, something very essential would break somewhere. And then you have to start looking for hacks and workarounds all over the internet.

After installing Kubuntu 16.10, I disabled all desktop effects and animations. Next, I added the "Show Desktop" plasma widget to the panel and tried using it. However it had a very funky behavior.

1. Pressing "Show Desktop" will not work everytime. 1 out of 5 times, it will miss the click. This happens when you have desktop compositor disabled and all other desktop effects turned off.

2. If you come to the desktop after pressing "Show Desktop" and try to open some app like a text editor, or right click and open "Folder View Settings" dialog and then close it, one of the minimised windows from the taskbar would popup.

The problem seems to happens only if you disable compositor and desktop effects.

After spending an entire day to find a solution, I found out that the "Show Desktop" widget is supposed to behave like this. Check the following link for more information -

https://www.reddit.com/r/kde/comments/4tvth3/the_show_desktop_button_annoying_behavior/

So the "Show Desktop" widget is supposed to "peek" the desktop and not minimise any app window.

Finally the fix

I was so fedup with this, that I started imagining the Unity desktop, something that I didn't like either. However that reddit page showed a workaround for the problem.

The trick is to create a shortcut to call a Kwin script that would minimise all windows. Then place the shortcut on the panel and use it as the "Show Desktop" button.

1. Enable Kwin MinimizeAll Script

Go to System Settings > Workspace > Window Management > Kwin Scripts

Enable the MinimizeAll script. Click Apply and close.

2. Create a MinimizeAll shorcut

Get to the following directory -

~/.local/share/applications/

Create a file called minimize.desktop

Open it in Kate editor and paste the following code in it

[Desktop Entry]
Categories=Utility;
Exec=qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "MinimizeAll"
Icon=utilities-terminal
Name=Show Desktop
StartupNotify=false
Terminal=false
Type=Application
X-KDE-SubstituteUID=false






Now save and close the file. Check the KDE menu > Utilities section. You should see a "Show Desktop" entry. Right click it and "Add to Panel".

Now click that new icon on the panel, and you should have the "Show Desktop" functionality. Once again Kubuntu feels great :)

Last Updated On : 17th February 2017

Subscribe to get updates delivered to your inbox

1 Comment + Add Comment

  • Exactly this!
    Thank you!!!

Leave a comment