After installing Firefox Developer Edition using the Aurora PPA method on 16.04 I dragged the icon from Activities to the launcher sidebar for handy access. But when I click that I get a 2nd firefox icon appear in the sidebar:
And every time I click the icon I added I get a new window. How can I get it to behave normally (i.e. when clicked it would display an already running firefox, or if there isn't one, start one)?
My Solution is to edit the
firefox-dev.desktop
file, adding--class FirefoxDev
to the Exec command andStartupWMClass=FirefoxDev
as a new line.The advantage of this one is that Firefox and Firefox Developer Edition will no longer share one icon if both are installed.
If you have enabled Wayland support by setting
env MOZ_ENABLE_WAYLAND=1
you also need to setMOZ_APP_REMOTINGNAME=firefox-dev
and add--name firefox-dev
to the Exec command.The WM_CLASS property of the window "Firefox-dev" doesn't match the file name of the
.desktop
file. You can check the WM_CLASS property usingxprop
and click on the opened Firefox's window.So, here is what I did to make it work :
Then you can add the new
firefox-dev.desktop
entry as favorite in you gnome-shell, and it will work.Cheers !
xprop WM_CLASS
. A+
pointer will appear, Click anywhere on the Firefox Development Edition window.WM_CLASS(STRING) = "Navigator", "Firefox Development Edition"
. Choose one of the classes, eg. Firefox Development Edition~/.local/share/applications/firefox_dev.desktop
. For example,StartupWMClass=Firefox Development Edition
. Don't forget to replacefirefox_dev
with the filename you have for your Firefox Development Edition.Using Ubuntu 20.04 - here is what I did to fix this issue in my case - Firefox Developer Edition.
Entered this command in my terminal
xprop -name "{{window_name}}"
.{{window_name}} was Firefox Developer Edition.
Noted down the class name given on the line
WM_CLASS(STRING) = "Navigator", "{{class_name}}"
.{{class_name}} was Firefox Developer Edition.
Changed this line
Exec=/opt/firefox/firefox
toExec=/opt/firefox/firefox --class "{{class_name}}"
and added this lineStartupWMClass={{class_name}}
at the end of the {{application.desktop}} file{{application.desktop}} was located at /home/{{user}}/.local/share/applications/firefoxDeveloperEdition.desktop, substituted {{class_name}} with value found in previous steps and {{user}} with my user.