Double Icons for pinned programs on Taskbar


when opening a pinned AppImage program, the program uses a second “instance” on the taskbar.

OS: Zorin OS, but that doesn’t matter because on the screenshot, you can see that the issue still occurs on the “default GNOME panel” when on the App Overview.

I can 100% guarantee that it’s a GNOME problem: Here you can see the exact same AppImage which was integrated using Gear Lever on KDE Plasma, on which the issue didn’t occur:
Screenshot 2024-04-15 223135

This is a problem between the app and its .desktop file. If the filename (or StartupWMClass) of the .desktop file does not match the WM_CLASS of the window, gnome-shell won’t associate the window with the app (and therefore app icon).

Thank you very much, that was easy!

For people reading this in the future:

  1. Press ALT+F2
  2. Type “lg” to open “Looking Glass”
  3. Go to “Windows” Tab
  4. Find out WM_Class of desired program
  5. Open .desktop file of desired program in /.local/share/applications
  6. “StartupWMClass” needs to be exactly “WM_Class” from step 4