MacOS – Prevent Firefox from stealing FirefoxESR events

browserfirefoxmacos

tl;dr: How to run both Firefox(79 as of now), and FirefoxESR(68) at the same time, and have FirefoxESR to be the default OS browser, where all external URL cliks get open at?

For a long time, at my work computer, I have used Firefox for work and another browser for personal links (previously Opera, lately Chrome).

Recently I've decided to use FirefoxESR for work, and Firefox for personal links.

All seem to work fine. I still have to binaries. Two icons (with different icons since ESR uses the old one). Profiles are completely separate. etc.

The only Problem is the that Firefox(latest) keeps stealing OS events from FirefoxESR, and I want ESR, i.e. my work browser, to be the default.

I want to keep FirefoxESR as my default OS browser. On the OSX prefences window I have already set ESR instead of latest:
Selecting default browser on mac

If only one Firefox is open, it will get all the external URL clicks. If both are open (doesn't mater which was open last, or which had focus last) external URL clicks will open a new tab on latest Firefox (the non default one!).

Already disabled the "set this browser as the default" on both browsers, and hoped the OS setting would prevail. No. Still get links on the wrong Firefox.

Is there any hope for this?

Here's the running processes I see. They show distinct profiles and processes and originating binaries just fine.

$ ps aux | grep Firefox
USER               PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
user          12406   0.0  1.1  8871828 382536   ??  S     3:50PM   0:11.91 /Applications/FirefoxESR.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container -childID 71 -isForBrowser -prefsLen 13552 -prefMapSize 185407 -sbStartup -sbAppPath /Applications/FirefoxESR.app -sbLevel 3 -sbAllowAudio -sbAllowWindowServer -parentBuildID 20200720181548 -greomni /Applications/FirefoxESR.app/Contents/Resources/omni.ja -appomni /Applications/FirefoxESR.app/Contents/Resources/browser/omni.ja -appdir /Applications/FirefoxESR.app/Contents/Resources/browser -profile /Users/user/Library/Application Support/Firefox/Profiles/b0s2tzpe.default-esr 1513 gecko-crash-server-pipe.1513 org.mozilla.machname.550427022 tab
user          12400   0.0  0.9  8765320 295044   ??  S     3:50PM   0:23.96 /Applications/FirefoxESR.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container -childID 70 -isForBrowser -prefsLen 13552 -prefMapSize 185407 -sbStartup -sbAppPath /Applications/FirefoxESR.app -sbLevel 3 -sbAllowAudio -sbAllowWindowServer -parentBuildID 20200720181548 -greomni /Applications/FirefoxESR.app/Contents/Resources/omni.ja -appomni /Applications/FirefoxESR.app/Contents/Resources/browser/omni.ja -appdir /Applications/FirefoxESR.app/Contents/Resources/browser -profile /Users/user/Library/Application Support/Firefox/Profiles/b0s2tzpe.default-esr 1513 gecko-crash-server-pipe.1513 org.mozilla.machname.478282958 tab
user          12320   0.0  0.2  8472860  57360   ??  S     3:42PM   0:00.38 /Applications/Firefox.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container -childID 15 -isForBrowser -prefsLen 8089 -prefMapSize 224843 -sbStartup -sbAppPath /Applications/Firefox.app -sbLevel 3 -sbAllowAudio -sbAllowWindowServer -parentBuildID 20200720193547 -appdir /Applications/Firefox.app/Contents/Resources/browser -profile /Users/user/Library/Application Support/Firefox/Profiles/027dcedw.default-release 11340 gecko-crash-server-pipe.11340 org.mozilla.machname.1180584643 tab
user          12309   0.0  0.3  8545064 105792   ??  S     3:41PM   0:01.16 /Applications/Firefox.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container -childID 14 -isForBrowser -prefsLen 8114 -prefMapSize 224843 -sbStartup -sbAppPath /Applications/Firefox.app -sbLevel 3 -sbAllowAudio -sbAllowWindowServer -parentBuildID 20200720193547 -appdir /Applications/Firefox.app/Contents/Resources/browser -profile /Users/user/Library/Application Support/Firefox/Profiles/027dcedw.default-release 11340 gecko-crash-server-pipe.11340 org.mozilla.machname.1651746662 tab


edit: trying to understand OSX launchservice

$ osascript -e 'id of app "Firefox"'
org.mozilla.firefox
$ osascript -e 'id of app "FirefoxESR"'
org.mozilla.firefox

Guess despite the OS seeing two distinct apps on the default browser dialog, it then proceeds to threat both as the same because they share the same ID.

I am assuming the nonESR version is picked because launchservice decides by picking the first on the list?

Best Answer

This doesn't have to do with firefox. The OS is sending the event to the wrong instance. i've opened a question centered on OSX OSX: control which of two applications with same id will be selected by launchservice?

Related Question