5

I've been at this for hours now. Nothing works, .desktop file below. I don't know why, but I can't drag&drop the open firefox-dev icon to my favorites, only when I look for it in Applications windows and drag it from there. But that way it just opens a new icon instead. Before this issue gets closed for a mildly similar question, below are all of the solutions I've tried.

[Desktop Entry]
Version=1.0
Name=Firefox Developer Edition
StartupWMClass="firefox-aurora", "Firefox Developer Edition"
GenericName=Web Browser
Exec=/opt/firefox/firefox %u
Terminal=false
Icon=/opt/firefox/browser/chrome/icons/default/default128.png
Type=Application
Categories=Network;WebBrowser;Favorites;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito

I've tried:

Cannot add custom launcher to Ubuntu Dock ('Add to Favorites' option does not show up)

Ubuntu Dock adds a new icon when I open certain programs

Duplicate icons for manually created GNOME launcher items

How do I install the Firefox Developer Edition?

Firefox developer edition icon duplication in Gnome shell

shook_one
  • 309

4 Answers4

5

setting StartupWMClass as

StartupWMClass=firefox-aurora

fixed my issue.

below StartupWMClasses doesn't work for me.

StartupWMClass="firefox-aurora", "Firefox Developer Edition"
StartupWMClass=Firefox Developer Edition

my desktop entry

[Desktop Entry]
Name=Firefox Developer 
GenericName=Firefox Developer Edition
Exec=/opt/firefox/firefox %u
Terminal=false
Icon=/opt/firefox/browser/chrome/icons/default/default128.png
Type=Application
Categories=Application;Network;X-Developer;
Comment=Firefox Developer Edition Web Browser.
StartupWMClass=firefox-aurora
StartupNotify=true
2

I had this exact problem, then I removed Firefox Developer Edition from favorites, and I lost the ability to add it to favorites again (that option was missing from the right-click context menu).

This answer you linked to, Firefox developer edition icon duplication in Gnome shell, helped me solve this issue, here's my /usr/share/applications/firefox-developer-edition.desktop (the naming could be relevant, not sure):

[Desktop Entry]
Version=1.0
Name=Firefox Developer Edition 
GenericName=Firefox Developer
Exec=/usr/bin/firefox-developer-edition/firefox --class "Firefox Developer Edition"
Terminal=false
Icon=/usr/bin/firefox-developer-edition/browser/chrome/icons/default/default128.png
Type=Application
Categories=Application;Network;X-Developer;
Comment=Firefox Developer Edition Web Browser.
StartupWMClass=Firefox Developer Edition

What fixed the problem for me was adding --class "Firefox Developer Edition" to the Exec line, but I'm guessing consistent naming matters as well.

1

I installed Developer Edition as an apt package on 24.04 and the default StartupWMClass in /usr/share/applications/firefox-devedition.desktop was firefox-aurora, while it has to be firefox-dev for the running window and the Dash pin to start recognizing eachother.

I almost gave up due to "nothing works" until I discovered I absolutely had to log out/in for the changes to take effect. update-desktop-database and/or reopening FF weren't enough. xprop + targeting cursor (suggested by the robots) doesn't work on the new Wayland server, apparently. You need ALT + F2 and 'lg' to find out the WMClass, but it's firefox-dev, I tell you.

Sometimes trying to pin devedition created some randomly-named entry for me under ~/.local/share/applications/, but afaict, it's bogus and can just be deleted.

0

It worked for me too. In my case, I had pinned the icon to the dock but when I opened Firefox, it added another, unpinned, generic icon to it. I closed Firefox, unpinned the icon from the dashboard, copied the file /usr/share/applications/firefox-devedition.desktop to ~/.local/share/applications/firefox-devedition.desktop, changed this file's StartupWMClass to firefox-dev, pinned the icon to the dock, opened Firefox again and voilá! Only the pinned icon was activated.