1

I'm trying to run a legacy copy of Firefox alongside the latest greatest Firefox. This works fine, I have two launchers like so in my .local/share/applications folder:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Firefox 29
Icon=custom.png
Exec=/usr/local/firefox-29/firefox --no-remote -P "Firefox 29"
StartupNotify=false

and

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Firefox Trunk
Icon=firefox.png
Exec=/usr/local/firefox-trunk/firefox %u -P Trunk --no-remote
StartupNotify=false

It works, but after I start the two browsers they end up sharing a new icon.

I found a launcher directive called StartupWMClass, and tried making them not match each other... but... it turns out both apps have the exact same WMClass:

$ xprop WM_CLASS                         # then click on FF 29
WM_CLASS(STRING) = "Navigator", "Firefox"
$ xprop WM_CLASS                         # then click on FF trunk
WM_CLASS(STRING) = "Navigator", "Firefox"

Is there a way to specify the WMClass for an application?

0

You can't specify the WMClass for Firefox 29, but you can for newer versions using the --class=Something command line argument.

So I adjusted the firefox trunk launcher like so:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Firefox Trunk
Icon=firefox.png
Exec=/usr/local/firefox-trunk/firefox %u -P Trunk --no-remote --class=FirefoxTrunk
StartupNotify=false
StartupWMClass=FirefoxTrunk

... and added StartupWMClass=Firefox for the Firefox 29 launcher, and now when I run xprop WM_CLASS...

$ xprop WM_CLASS                         # then click on FF 29
WM_CLASS(STRING) = "Navigator", "Firefox"
$ xprop WM_CLASS                         # then click on FF trunk
WM_CLASS(STRING) = "Navigator", "FirefoxTrunk"

Yay!

So now the launchers each work as expected, with their windows attached to the correct launcher, and no new phantom launcher gets created.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.