I should mention I use the prebuilt Firefox binary (firefox-bin).
You can learn a little bit about the terms used, factors involved, and history with regards to Wayland that relate to this issue here (among other places):
https://bugzilla.mozilla.org/show_bug.cgi?id=1530052
I have a modified start menu entry for Firefox which has resulted in an overriding .desktop file in my home directory:
Code: Select all
~./local/share/applications/firefox-bin.desktop
Under
It contains, among others, the following lines:
Code: Select all
Icon=firefox-bin
Name[en_US]=Firefox
Name=Firefox
StartupWMClass=firefox
If I comment out the lines (using #) of the two lines starting with Name AND the line starting with StartupWMClass, and then launch Firefox from the start menu (not the pinned icon in the task manager, if it exists) then I have the same symptoms as you. The Firefox icon is not found and instead the generic Wayland icon is used. As well, all of the open Firefox windows will not be grouped under one icon but show up as multiple icons, one for each window that is open.
If I comment out just the line starting with Icon and leave the others I have the same issue, except in addition, when the application is closed, there is no icon present on the task manager where I have the application pinned for quick access and there is no icon in the start menu (only the title of the application is present).
You first can check to see if you have a local modified copy of the .desktop file for launching Firefox in your home directory in ~/.local/share/applications. You can modify that file directly with a text editor. If it does not exist, you can copy the current .desktop file for Firefox from /usr/share/applications to ~/.local/share/applications. Then you can modify the file in your home directory.
Make sure the icon that the .desktop file is using exists on your system.
For various reasons, I have these:
Code: Select all
locate firefox.png
~/.local/share/icons/HighContrast/16x16/apps/firefox.png
~/.local/share/icons/HighContrast/22x22/apps/firefox.png
~/.local/share/icons/HighContrast/24x24/apps/firefox.png
~/.local/share/icons/HighContrast/256x256/apps/firefox.png
~/.local/share/icons/HighContrast/32x32/apps/firefox.png
~/.local/share/icons/HighContrast/48x48/apps/firefox.png
~/.local/share/icons/hicolor/128x128/apps/firefox.png
~/.local/share/icons/hicolor/16x16/apps/firefox.png
~/.local/share/icons/hicolor/22x22/apps/firefox.png
~/.local/share/icons/hicolor/24x24/apps/firefox.png
~/.local/share/icons/hicolor/256x256/apps/firefox.png
~/.local/share/icons/hicolor/32x32/apps/firefox.png
~/.local/share/icons/hicolor/48x48/apps/firefox.png
~/.local/share/icons/hicolor/64x64/apps/firefox.png
/usr/share/icons/HighContrast/16x16/apps/firefox.png
/usr/share/icons/HighContrast/22x22/apps/firefox.png
/usr/share/icons/HighContrast/24x24/apps/firefox.png
/usr/share/icons/HighContrast/256x256/apps/firefox.png
/usr/share/icons/HighContrast/32x32/apps/firefox.png
/usr/share/icons/HighContrast/48x48/apps/firefox.png
Which particular icon the application is using for representation in the task manager or on the panel on my desktop I cannot say for certain.
You can also verify that the startup WM or window class is correct.
You can also detect the window properties of Firefox when it is opened to see what Window Class is being used. Go to SystemSettings>Window Management>Window Rules. Click on 'Add New +' in the top right. When the 'New window settings' dialog box pops up, click on "Detect Window Properties' at the bottom.
Both this window and the open Firefox window need to be open and visible at the same time for this to work. After clicking on 'Detect Window Properties' your mouse pointer will now change shape to a large '+' sign and become a site pointer or selection pointer. Now click on the open Firefox window. A new dialog box will pop up titled 'Add property to the rule'. Among the items to check would be 'WIndow Class' and 'Whole Window Class'.
On my machine with the icon working, it says:
Code: Select all
WIndow Class (application) firefox
Whole Window Class firefox-bin firefox
I mention all of this because in the past I have set a rule to 'force' that sets the Window Class to the desired value and the icon was found. It is also a great tool to know what the window manager or specifically Wayland in my case determines as the Window Class. If anything the information can be helpful when troubleshooting.
I am not at your computer so I can't exactly say what the best solution would be for your scenario but hopefully I have pointed you in the right direction. If not, I hope I have given some insight as to what may be causing the issue.