Icons not being displayed appropriately in KDE plasma

On some applications like ZIM and a few others sometimes the icons that are displayed while doing ALT+TAB or while viewing the entire desktop are not shown correctly. Typically a “W” with yellow background is shown and not the applications icon. Please see the attached screenshot with the icon circled in blue.

However on the K application launcher/application menu/ application dashboard, i.e. Windows start menu equivalent in KDE, the correct icons as shown. In the KDE Menu Editor the correct icon is listed. Also In the KRunner, invoked by pressing ALT+Spacebar, the correct icon is displayed.
But in the KDE task manager and the KDE panel the application icon is a “W”, as shown in the screenshot above circled in blue.

How to fix this so that the correct icon of the application is shown when using ALT+TAB or while viewing the overview of the desktop?

To reiterate this happens only for a few applications and not for all the applications. Most of the applications the correct icon is shown.

The output of inxi with DE and other relevant details is below

inxi output for DE

$ inxi -Sxxz
System:
Kernel: 6.12.20-1-lts arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
Desktop: KDE Plasma v: 6.3.3 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
Distro: EndeavourOS base: Arch Linux

Edit:
I had incorrectly used some terminology related to KDE. This post has been corrected for that.

I get this occasionally, picture-in-picture windows mainly, if it worries you report it on the KDE bug tracker. I assume Zim is GTK?

Yes:

Also the “W” is a generic Wayland icon.

Thanks for clarifying that “W” is a generic Wayland icon. And yes ZIM is a GTK3 based application.

So why does KDE not display the correct icon for ZIM but displays a generic Wayland icon? Also this happens for other applications like bauh too. Bauh is not based on QT6 or GTK. Rather uses python3 and python-qt5 bindings.

Allright found the issue and how to resolve it. But this is a very hacky way of doing it. This requires that for all the applications which have this problem, i.e. the default Wayland icon is displayed, this has to be done. There is already a bug reported about this in KDE version 5.25.3 and which was supposed to have been fixed in KDE version 6.3. But apparently it has not been fixed. I am on ver 6.3.3 but it is still not working.

To solve the issues follow the steps given in the comment number 35. In step number 8 change the file name to the actual desktop file name being used. To find the actual desktop file name of the application one of the following options can be used

Go to Octopi, which is a GUI frontend for pacman, and select the package. Once the package is installed click on the Files tab in the bottom and look for the .desktop file. That is the file name that you have to give in step number 8

OR

Typically the .desktop files are kept in the directory /usr/share/applications. Look in that directory for the file name.

Remember to give the exact filename with the .desktop extension and not the full path of the filename. Just the exact file name. Also dont forget the .desktop file extension.
I am not able to determine why this happened though. Is it because this is a GTK3 application? Or is it due to some other reason. When I looked in the kwin debug console I found that the application zim was listed under “Wayland Windows” and not under “X11 Windows” or under “X11 Unmanaged Windows”. So ZIM application is not using XWayland. So XWayland cannot be an issue over here.

1 Like