Customize Firefox to use different Application Support subfolder?
I have an unusual requirement. I want to have two separate copies of Firefox.app which have different bundle identifiers and keep their profiles in different subfolders of ~/Library/Application Support. For example, Firefox.app with bundle ID org.mozilla.firefox would keep its profiles in ~/Library/Application Support/Firefox and FirefoxAlt.app with bundle ID org.mozilla.firefoxalt would keep its in ~/Library/Application Support/FirefoxAlt.
I am aware of the profile manager and it doesn't suit my needs.
I want to have separate instances of Firefox running simultaneously for different profiles. If I launch two instances of the same Firefox.app, using the profile manager to select a different profile for each, then I get weird behavior when I open URLs from other apps. Basically, it's arbitrary which instance of Firefox gets the opened URL.
With Firefox 18.x, I was able to accomplish what I needed. I duplicated Firefox.app to FirefoxAlt.app changed its bundle ID and bundle Name, modified its application.ini to have Name=FirefoxAlt, and replaced its "firefox" executable to be a shell script which invoked firefox-bin with "-app $path/application.ini".
I've just tried to upgrade to Firefox 21 and find that this doesn't work. FirefoxAlt.app just quits itself immediately after launch. Is there a way to accomplish what I want with current versions of Firefox?
Chosen solution
Use the -no-remote command line switch to open another Firefox instance with its own profile and to run different Firefox instances simultaneously, but do not use -no-remote with the default browser and the default profile.
- http://kb.mozillazine.org/Opening_a_new_instance_of_Firefox_with_another_profile
- http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox
- http://kb.mozillazine.org/Bypassing_the_Profile_Manager
See this article about how to install multiple versions on Mac OS X:
Skaityti atsakymą kartu su kontekstu 👍 3All Replies (4)
What are you looking to do that? What are you trying to achieve?
I did something like that in linux, just making sure each instance of firefox was called with `-no-remote` and `-profile name`. I finally created to different launchers (.desktop files) which launched each of them. I mostly did that because I needed way different addons (one profile was to normal browsing and the other one to develop), but in the end it turned to be a bit annoying.
Anyway, why is that you say that it's not enough? Having two installations it's still making arbitrary the choose of which instance it's used right? (as long as I remember, the first instance was the one who was used to open links, because I wasn't starting it with a specific profile).
Hi. Thanks for responding.
The reason is the same general reason for supporting multiple profiles. I want to separate certain uses of the browser from others. Have separate sets of extensions. Have separate sets of bookmarks, cookies, remembered passwords, etc.
On the Mac, one establishes a preferred default browser based on the bundle identifier. Since I've given the two apps, Firefox.app and FirefoxAlt.app, two separate bundle identifiers, I can control which is used as the default browser. I can also set up scripts and services to target the other (non-default) browser in specific circumstances.
If I just have the one Firefox.app but try to use separate profiles, then it's more or less arbitrary which gets a URL. When I say arbitrary, I don't necessarily mean random. It may be (and probably is) based on which was opened first. But I want to treat the two versions of Firefox as separate apps, so the order in which I open them is arbitrary. Sending URLs to the first I launch is effectively arbitrary for my purposes.
Chosen Solution
Use the -no-remote command line switch to open another Firefox instance with its own profile and to run different Firefox instances simultaneously, but do not use -no-remote with the default browser and the default profile.
- http://kb.mozillazine.org/Opening_a_new_instance_of_Firefox_with_another_profile
- http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox
- http://kb.mozillazine.org/Bypassing_the_Profile_Manager
See this article about how to install multiple versions on Mac OS X:
Thanks for the suggestion. The Business Insider article you linked to doesn't quite help because both apps continue to have the same bundle identifier. That means that I still wouldn't have control over which gets asked to handle a URL opened from another program.
However, taken all together and adding my own tweaks I guess I have a solution. I have edited the FirefoxAlt.app to have a different bundle ID (and bundle name, although that's not directly relevant). I have also changed which executable the app bundle launches. I have set it to use a custom script I created that sits beside the firefox and firefox-bin executables. The shell script runs the adjacent firefox with the -profile option, passing the full path to the alternative profile I have in the ~/Library/Application Support/FirefoxAlt directory.
For what it's worth, I don't appear to need to use -no-remote. My understanding is that is required, at least on some platforms, to allow multiple instances to run simultaneously without detecting the other and refusing to run. I have no problems running Firefox and my FirefoxAlt simultaneously without that.
It doesn't feel quite as "clean" as directing FirefoxAlt.app to use a completely separate application support directory by changing its Name property in application.ini, but it seems to work.
Thanks to both of you for the nudges necessary for me to find the solution.