Missing Firefox icons

I’m on up to day TW but icons have been missing for maybe a year, I just never got around to solving this problem.

Firefox looks okay in kdemenuedit, with the icon and everything, and FF icon shows up in task manager and in FF window decoration when Firefox is open, but in KDE menu and in a panel I created (ages ago) the icons are missing. They are circled red in the screenshot:

https://i.imgur.com/eF8IoXi.jpg

If I right-click the missing icons in the panel on the left or in KDE launcher and select “Edit application” the icon is present in the dialogue that pops up, but even if I change it to something else it doesn’t register with neither the panel nor with the launcher.

I suppose I don’t have the right FF icon file saved in the place the panel and launcher look for, but where is this place and what do they need exactly? I looked around the machine and there are all kinds of directories for storing icons - “hi res”, “16”, “32”, “256” and so on.

The panel is probably a leftover from KDE 4.

For troubleshooting: Add a second panel. Does the new panel work correctly?

I added one at the top (empty panel), added applications widget and it still doesn’t have Firefox icon under “internet”, but dragging and dropping FF from the menu onto the panel creates a shortcut with an icon.

Imgur

This “drag and drop” doesn’t work on the panel on the left, however, so I can’t replace old FF link with a new one.

I get an icon with the above application starter using current Tumbleweed. Logout from GUI and delete cache directory:

rm -r ~/.cache/

No luck for me. I logged out, switched to virtual terminal, deleted cache, switched to login screen again - icons are still missing.

Try to add it with

kmenuedit

opened as User.

Maybe

kbuildsycoca5

as User is helping?

Hmm, here it’s Leap 15.2 but the basics should be the same. The “icon” refers to /usr/share/applications/firefox.desktop. In that file the definition of the icon is:

[Desktop Entry]
Categories=Network;WebBrowser;GTK;
Encoding=UTF-8
Name=Firefox
GenericName=Web Browser
Comment=Web Browser
TryExec=firefox
Exec=firefox %u
**Icon=firefox**
Terminal=false
StartupNotify=true
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;application/x-xpinstall;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
Type=Application

Actions=new-window;PrivateBrowsing;ProfileManager

[Desktop Action new-window]
Name=New Window
Exec=firefox --new-window %u

[Desktop Action PrivateBrowsing]
Name=New Private Browsing Window
Exec=firefox --private-window %u

[Desktop Action ProfileManager]
Name=Profile Manager
Exec=firefox --ProfileManager



Assuming it’s there? Since it’s not referring to a definite target I’d say it must “fall back” on “system settings” i.e. generic KDE settings. Checking file list of firefox all the icons are in “/usr/share/icons/hicolor/”
There’s two files that migh be responsible: “/usr/share/icons/hicolor/index.theme” and “/usr/share/icons/hicolor/icon-theme-cache”. Searching “index.theme” there’s no hint to “firefox”. So that all seems to be generic KDE. “icon-theme-cache” is not a txt file but there’s traces of “firefox”.

So, maybe try deleting (or first renaming) “/usr/share/icons/hicolor/icon-theme-cache” and log out/in?

Kmenuedit shows firefox icon as expected, but it doesn’t affect the menu itself. Kbuildsycoca5 is “already running” and doesn’t seem to affect anything either.

Another thing is that “panel on the left” is not available for kmenuedit but KDE adds its own things there periodically, like “Discover” I didn’t know exist.

Firefox.desktop file has “Icon=firefox” entry as expected.

/usr/share/icons/hicolor/ has lots of directories indicating icons sizes and most of them have firefox in “apps” subdirectory. It is missing in “scalable”, however, and in some weird sizes with only one special app placing its special icon there, but otherwise it’s everywhere it’s expected to be.

Renaming icon-theme-cache didn’t affect anything and the file wasn’t recreated after logout-login.

Today, with update to kernel-default 5.19.8-1.1, the missing icons came back.