Summary: | Panel / Task bar / Task Manager shows stub icon for Firefox when Firefox is running; unable to customize Firefox's icon | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Chad Joan <chadjoan> |
Component: | Task Manager and Icons-Only Task Manager widgets | Assignee: | Eike Hein <hein> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, plasma-bugs-null, swooopi |
Priority: | NOR | ||
Version First Reported In: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=353733 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Plasma 5 panel/taskbar showing stub icon for running Firefox |
Description
Chad Joan
2018-05-22 20:19:22 UTC
This is caused by Firefox being incorrectly installed. Here's how this generally works on Linux: * The app installs a NAME.desktop file * X11: The app sets the WM_CLASS of its window to NAME * Wayland: The app sets the appid of its window to NAME.desktop * The .desktop file contains an Icon=SOMETHING line * The app installs an icon named SOMETHING in hicolor, or the current icon them (or anything in its inheritance hierarchy, which eventually hits hicolor) contains a SOMETHING icon Well-behaved and well-installed apps get all of this right. Various apps do not get it right, so the Task Manager code has numerous heuristics and fallbacks to work around their bugs - digging into other metadata, matching up executable names from /proc to Exec= keys in .desktop files, etc. It appears none of those do the right thing on your system. The goal would be to work towards the optimal scenario painted above. The /opt stuff makes me think you have a stray firefox .desktop file in your system somewhere that takes precedence and misleads everything. You can use xprop to get the WM_CLASS for the window. (PS.: Also a Firefox user here fwiw :) I need to close this as WORKSFORME for now because there's nothing I can really do, but if you've worked through the above pointers and still think you're hitting some sort of real bug, feel free to reopen and we continue. Thanks! That process overview is excellent, and it's good to know about those fallback heuristics. I will use that information to investigate more. Problem seems fixed after removing the ~/.local/share/applications/firefox.desktop file. Specifically, I moved it to a backup file like so: cd ~/.local/share/applications mv firefox.desktop firefox.desktop.bak-2018.11.19 It took me a while to revisit this problem, but inspiration hit: I think Eike's mention of /opt being odd and an incorrect .desktop file were the hint I needed. The contents of the firefox.desktop file looked like this: [Desktop Entry] Exec=/opt/firefox/firefox Icon=application-x-executable Name=firefox Type=Application This seems a likely candidate for explaining why plasma was looking for the /opt/firefox/firefox file that did not exist (the /opt/firefox directory also doesn't exist). I'm not sure I understand specifics about the mechanisms involved, but I can see how telling KDE/plasma to open a non-existent executable might confuse it. Or perhaps the .desktop was outdated and accidentally overrode metadata from more well-updated system files. Whatever the possibilities, that file seemed like a source of problems, and removing it fixed this problem. I'm also not sure how I ended up with the state in the first place. Maybe Firefox really did live in /opt/firefox/firefox at one point in history, and then an upgrade at some point moved it elsewhere, but without updating the .desktop file (and it's hard to expect a package manager or install script to always perfectly handle updates to user configuration). Maybe these are remnants of some workaround from days past. I'm not too worried about it because of how isolated this seems. Thanks for the help Eike Hein! Glad you were able to work it out & thanks for the ticket update! |