By using this site you agree to the use of cookies.

Learn more

Share via:

How to Avoid Duplicated Icons in Dash and Unity

This simple tutorial shows how to solve the problem with duplicated icons created by custom .desktop files.

Edited: 2017-06-13 13:04

When launching an application from a custom .desktop file, it may result in a duplicated icon showing up in the Gnume's dash or Ubuntu's unity launcher panels. To avoid this problem, we may specify the window class in the launcher .desktop file, we can do this by opening it with gedit.

The Window class of a program can be obtained by typing xprop WM_CLASS in a terminal, then selecting the main window of the program by clicking on it, the window class will then be written out in the terminal, and then we can simply copy and paste it into the launcher.

Note. If the window is not visible simply press alt + tap until it is in focus.

You will need to open the .desktop file in a text editor, and add the following line:


Note. The [Name_of_Window_Class] part should be replaced with the output of the xprop command.

When done, restart the application, and there should now only be one icon visible in dash.

Where to find application launchers

Possible locations for custom launchers are:

  • ~/.local/share/applications
  • /usr/local/share/applications
  • /usr/share/applications