I'm running KDE on Arch Linux. I have the following two
[Desktop Entry] Comment=First Profile Exec=firefox --no-remote -P First %u GenericName=Firefox First Profile Icon=/path/to/custom/icon1.png Name=FF_First NoDisplay=false Path[$e]= StartupNotify=true Terminal=0 TerminalOptions= Type=Application X-KDE-SubstituteUID=false X-KDE-Username= [Desktop Entry] Comment=Second Profile Exec=firefox --no-remote -P Second %u GenericName=Firefox Second Profile Icon=/path/to/custom/icon2.png Name=FF_Second NoDisplay=false Path[$e]= StartupNotify=true Terminal=0 TerminalOptions= Type=Application X-KDE-SubstituteUID=false X-KDE-Username=
When I initially launch one of these Firefox profiles, the icon that shows up in the task manager bar in Plasma's panel is the custom icon I specified in the .desktop file. But as soon as Firefox has finished starting up, the icon in the task manager (Plasma panel) reverts to the standard Firefox icon. How do I make my custom icon stick in the task manager panel on a per profile basis?
One approach I tried was creating a separate shell script to launch each profile, but that resulted in the same outcome: once Firefox is launched, every profile shows with the same generic Firefox icon in the task manager.
There is a similar question here, but it is not about icons per Firefox profile and it doesn't answer my question.
Update: based on the answer by fra-san, here is my updated desktop entry:
[Desktop Entry] Comment=Second Profile Exec=firefox -P Second --class=FFSecond GenericName=Firefox Second Profile Icon=/home/allusers/application_icons/Second/Firefox_Logo_128x128.png Name=FFSecond NoDisplay=false Path= StartupNotify=true Terminal=0 TerminalOptions= Type=Application Categories=Network;WebBrowser X-KDE-SubstituteUID=false X-KDE-Username= StartupWMClass=FFSecond
I am not getting results yet. The above entry displays the standard firefox icon in the tabs in the "Task Manager" widget of KDE Plasma's Panel, exactly the same as the standard firefox desktop file does.
I tried the Exec line with -no-remote, with -new-instance and without either and there was no difference in terms of the icon.
As mentioned, I want each Firefox profile to display its custom icon in the tabs in the "Task Manager" widget of KDE Plasma's Panel.