I want to assign an icon to SoftSqueeze (a software radio based on the Logitech Squeezebox, written in Java) in Ubuntu 20.04 with gnome 3.

I created a .desktop file in ~/.loca/share/applications:

[Desktop Entry]
Exec=java -jar /opt/softsqueeze_3.9.2/SoftSqueeze.jar

After that, the application is found with the right set icon (above specified in Icon=), but if I start the application, a funny pixelated headphone instead is shown.

In Cairo dock, I created a launcher by adding a new one and give it the right command and icon with it. It came also up with the wrong icon (a funny pixelated headphone).

I assume this "headphone" icon is maybe set within the jar of the softsqueeze.

How do I assign the right icon in Gnome 3 and in Cairo dock?

1 Answer 1


Solution: One have to assign a WM_CLASS (in Cairo dock called "Class of the program", found in the extra parameters of the Desktop entry). it is something like a link between the windows manager and the instance of the program itself, so my explanation would be, with that link correctly set, the window manager does not have to create another icon "instance" (the double icon, which in my case was also looking differently (the solution should nevertheless also working if the icon is the same, but double), and even on python or other script based programs):

For Gnome 3 I use in terminal the following command:

xprop | grep WM_CLASS

I clicked then with pointer shown up on the already started and shown up java application in the foreground and got the name of the WM_CLASS in the terminal window. This I have to add in the .desktop entry above as a property "StartUpWMClass". Save the file and the icon of the jar will vanish.

In my case it was


The same you have to do to the extra parameters of your desktop entry in your cairo dock. Then the icon "headphone" will vanish and your set icon will be the only icon when starting the app.

Reference: Launchpad Bug description which helped me a lot finding the solution

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .