17

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.

fixer1234
  • 28,064

3 Answers3

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

martineau
  • 4,573
ricbax
  • 5,118
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.

Nickolay
  • 541
7

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.

iff_or
  • 105