As the maintainer of Plank Reloaded, the most common bug report I get is “this app has the wrong icon.” It’s almost never the dock - it’s a broken StartupWMClass in the app’s .desktop file. So I wrote up how to find the right value on X11, Wayland, and KDE, and why deleting the line often fixes it.



I just checked the
.desktopfile for firefox nightly. It contains onlyfirefox-nightlyas itsStartupWMClass. So I went ahead and also checked the window class firefox nightly is running as and found the following:Does this mean that firefox nightly is using both, the
firefoxand thefirefox-nightlywindow classes?Yep it has both applied. What are the actual .desktop file names?
The desktop files are named
firefox.desktopandfirefox-nightly.desktop, both in/usr/share/applications.EDIT: For completeness, I also checked the window classes of the regular firefox:
It can be observed that it uses only the window class
firefox, but twice?Yeah in your case the best fix is probably REMOVING StartupWMClass from those launchers if it is present. Then it will only match the app id on the .desktop file name.
Hmm, but I thought the
StartupWMClassesin the desktop files are correct? I thought the issue is that firefox-nightly uses thefirefoxclass in addition to thefirefox-nightlyclassStartupWMClass is NOT needed if the .desktop file is named correctly.