Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Firefox task icon show wayland generic icon
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1235

PostPosted: Wed Jan 01, 2025 9:49 pm    Post subject: Firefox task icon show wayland generic icon Reply with quote

Hi everyone, I am working actually on my Linux distribution.

I would like to ask just something about firefox.
So I built firefox with the package manager I coded.

But I am facing a problem with firefox only (maybe because it's a GTK app ?).
When I open firefox, the icon in the task manager is the generic wayland icon (yellow circle with a 'W' inside)

What can be the reason ?
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3821
Location: Rasi, Finland

PostPosted: Wed Jan 01, 2025 10:00 pm    Post subject: Re: Firefox task icon show wayland generic icon Reply with quote

Fulgurance wrote:
icon in the task manager
What is this task manager?
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1235

PostPosted: Thu Jan 02, 2025 2:35 pm    Post subject: Reply with quote

Sorry I forgot to specify my bad. So I am using Kde Plasma 6.

So I am talking about the graphical task manager (applet)

This is a screenshot:

https://i.ibb.co/5jvHvqc/Screenshot-20250102-143345.png
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3821
Location: Rasi, Finland

PostPosted: Thu Jan 02, 2025 4:39 pm    Post subject: Reply with quote

Ok.
I'm unfamiliar with kde, but here's what I suspect:
    The task bar is unable to load the icon meant for firefox. It then probes if the created window is from Xwayland or native wayland windows and then displays default icon accordingly.
Check that you have required USE -flags set for kde components which provide png and svg support as icons are usually in that format.

Does any log give you any hints what might be going on? How about launching Firefox from terminal?
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
rab0171610
Guru
Guru


Joined: 24 Dec 2022
Posts: 446

PostPosted: Thu Jan 02, 2025 7:18 pm    Post subject: Reply with quote

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:
~./local/share/applications/firefox-bin.desktop

Under
Code:
 [Desktop Entry]

It contains, among others, the following lines:

Code:
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:
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:
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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum