16

I have different Firefox profiles for each version I have installed on my system and I know I can specify the profile name I want to use like this:

/Applications/Minefield.app/Contents/MacOS/firefox-bin -P minefield

Is it possible to create a dock icon or alias with additional parameters (just like in this article with shortcuts on windows)? That way I could have as many profiles as I want and wouldn't see the profile manager everytime I start the browser.

3 Answers 3

8

It's a bit more work to do this on mac but this is what you want:

Managing Multiple Firefox Profiles in OS X (via Internet Archive WayBackMachine)

The custom Firefox icons are still available from Gnome-Look.org

1
  • 2
    Thanks, it works. The only thing I don't like is that I have two icons on my dock now. One for the launcher and one for the app itself. Commented Nov 25, 2009 at 17:22
7

Script Editor based solution was quite slow for me, so I looked for an alternative.

I ended up creating an application bundle with a bash script inside - see details at Using Firefox profiles on Mac OS X.

6
  • 1
    I suggest open -a Firefox.app --args [...] as it's more robust (installation path, binary name).
    – Daniel Beck
    Commented Feb 11, 2011 at 21:02
  • 2
    @DanielBeck: Thanks for the tip! Somehow I missed it when you posted it. Note to other readers: you will need the -n flag (as in open -n -a Firefox.app --args -no-remote -P ...) to open multiple instances, as by default open focuses the existing application.
    – Nickolay
    Commented Jan 3, 2012 at 0:16
  • This non-script alternative still works in Mavericks 10.9.1 and, when coupled with the custom icons mentioned in the other answer, is an especially copacetic solution.
    – martineau
    Commented Feb 7, 2014 at 16:32
  • Very relevant answer: superuser.com/a/236446/567432 It's about how to launch an app with command line arguments (in general), and it so happens the Firefox Profile Manager is the example used. I tested it and it works.
    – Mentalist
    Commented Jul 7, 2020 at 13:50
  • It is broken on 10.15. Profile window opens but no urls may be opened from other apps bugzilla.mozilla.org/show_bug.cgi?id=1653218
    – Belegnar
    Commented Jul 16, 2020 at 23:19
6

Here in the future I run multiple Firefoxes, each with unique Dock icons, app names, and unique & separate user profiles.

My motivations

  • to have multiple Gmail, Twitter, GitHub etc. accounts simultaneously logged-in
  • to group websites by concept: coding, comms, news, finance, video, music
  • to label them by concept /Applications and the tab-switcher, and provide unique visual identity with different MacOS .icns file
  • to bucket my cookie exposure, in order to avoid over-sharing my movements about the internet with le Goog, social media, and advert tracking firms

How I did it

1. Copy Firefox (bulky at ~360MB per copy, I know, but haven't found another viable option, see below)

  • Duplicate /Applications/Firefox.app using Cmd-D or sudo cp -r ...
  • Rename the new app folder from Firefox copy.app to whatever, FF Proxied.app in my case

2. Give your FF copy a new visual identity

  • Change the icon by right-clicking FF Proxied.app and clicking Get Info, then drag your new icon onto the Firefox icon, replacing it. Close the Get Info dialog
  • You can create a .icns file using the Python console script generate-iconset made by retif. Be sure to start from a square PNG image; I use GIMP to make the background transparent by adding an alpha channel.
  • Change the app label (displayed in macOS's menubar) by editing FF Proxied.app/Contents/Resources/en.lproj/InfoPlist.strings and changing its contents from CFBundleName = "Firefox"; to CFBundleName = "FF Proxied";

3. Give your FF copy its own user profile

  • I mkdir mine under ~/ff_profiles, and you may want to create a similar top-level folder for your FF profiles
    • mkdir ~/ff_profiles/proxied (for example)
  • Start FF Proxied in Profile Manager, like so-
    $ /Applications/FF\ Proxied.app/Contents/MacOS/firefox --ProfileManager
    
  • Once in Profile Manager dialog-
    • click Create Profile...
    • click Continue
    • name the profile whatever
    • click Choose Folder...
    • navigate to the folder you just mkdir'd, then click Open
    • click Done
    • Back in the Profile dialog, ensure the profile you just created is highlighted, and that you've checked the checkbox [X] Use the selected profile without asking at startup
    • now click Exit

4. Add your new FF copy to the Dock

  • in Finder, navigate to FF Proxied (or whatever you named yours), and drag it onto the Dock

5. Test it

  • click your "new app" on the Dock

Upsides

  • separate app instances
  • separate visual identities (icons, labels)
  • provides a fairly durable and concept-limited container for groups of websites
  • I no longer hunt for open tabs anymore (yes I used the switch to tab feature before this, but that doesn't solve the concept-grouping need)
  • better than all the tab and window organizer extensions I've tried on both FF and Chrome

Downsides

  • more disk space consumed
  • each copy will prompt you update when new versions come (but each copy does index update only its own copy)
  • the overhead of running multiple FF instances
  • you have to set up preferences from scratch for each FF copy
    • I tried copying prefs folders, but they appear to have baked in whatever path they were created on, annoyingly

Other options I tried

  • Platypus: no joy; it's meant for CLI scripts, not GUI apps
  • Script Editor: same experience as @Nickolay (above)
  • Firefox's Multi-Account Containers extension? Not in my experience, because-
    • a domain name can belong only to a single container
    • therefore having several gmail.com's open doesn't work very well
    • opening new tabs for a container is awkward
    • the extension doesn't seem to manage cookie separation very well, and sometimes I find that a site I logged into on one tab, will not be logged in when I visit the same site in a new tab
  • Symlinking all but the menubar label file (FF Coding.app/Contents/Resources/en.lproj/InfoPlist.strings)
    • This runs into a weird bug where Firefox cannot access files under symlinked folders, e.g. .../Content/Resources/omni.ja (zipfile archive apparently containing Firefox's JS chrome code)
    • see my attempt at a Firefox symlinker script here
    • If the symlink bug was fixed, symlinked clones of Firefox would mainly cost the diskspace for the .icns file, folders & symlinks, and InfoPlist.strings

All corrections & suggestions will be appreciated.

3
  • Have you tried the Automator bundle way? I like Firefox (and in fact all my non-system apps) managed by homebrew, and having to make an exception would be another downside of your solution. The Automator one comes closest for me but so far I don't know how to set a distinct icon that will persist in all relevant places even when it's running so I can easily switch to it. This is turning out to be the least tractable problem with the Mac UI since I switched from Linux last year :-(
    – q.undertow
    Commented Aug 9, 2022 at 15:48
  • @q.undertow, thank you for the suggestion, I hadn't looked very far at other macOS solutions. I wonder if it's possible to substitute a file on launch, such as the icon container. I do realize my approach is arduous, and not many will adopt it. I'll take a look at Automator and and AppleScript, see if they have ways around launching multiple copies of an app, customized. Commented Aug 23, 2022 at 20:40
  • @Kevin-Prichard: Thank you so much! I just used your steps and it worked perfectly for me. I have to login to a network switch multiple times a day that has a bad self-signed certificate. The admin hasn't prioritized the issue and I get logged out after 10 minutes of activity. This is totally worth the headache for the time saved for this one site. Commented Jun 15, 2023 at 22:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .