Mac Magic: a Skulk of Firefoxes
I recently started using the gmail interface for my work email. Since it’s possible by default to run only one instance of Firefox on a Mac at a time, this left me unable to keep an eye on the gmail account that I use for professional development. Doing this is easy enough in Windows using icons that launch different Firefox profiles, but the Mac solutions I found only taught me to create differing profiles, not how to launch them simultaneously. This post details how to create two or more Firefox profiles AND use them at the same time. Each profile maintains different bookmarks, extensions and saved tabs.
Step 1: Create your second Firefox profile
In Terminal, type this command to bring up the Firefox Profile Manager:
Click the Create Profile… button to do just that. Be sure to uncheck “Don’t ask at startup.” This will allow you to use your regular Firefox icon (in your Applications folder) to launch the Profile Manager.
Step 2: Create scripts to launch each profile
Launch the Script Editor and paste this into a new script:
do shell script "/Applications/Firefox.app/Contents/MacOS/firefox -P profilename &> /dev/null &"
where profilename is the name of the second profile.
Save this as an Application Bundle in your Applications folder, or wherever you like to store applications. When you save the bundle, be sure to uncheck the “Startup Screen” box, or the script will ask you what to do when you launch it.
Repeat this step to create an Application Bundle for your default profile, using this string:
do shell script "/Applications/Firefox.app/Contents/MacOS/firefox -P default &> /dev/null &"
Step 3 (optional): Assign an icon to your new application bundle
Like many things Mac, changing the icon of any file is easy and intuitive–once you know how it’s done.
- Find a file or application with the icon you wish to use and press Cmd+I to open its information pane.
- Click the icon in the top-left corner of the information pane. It becomes highlighted. Press Cmd+C to copy the icon to the clipboard.
- Find your application bundle and press Cmd+I to open its information pane.
- Click the icon in the top-left corner of the information pane. It becomes highlighted. Press Cmd+V to paste the icon.
- Close both information panes.
Step 4: put your new Firefox icons on your desktop, in your dock, or your favorite place to launch applications.
Extra credit: Install Quicksilver and launch your custom Firefox icons from the keyboard.
- I initially used the bitsy Firefox as the icon picture on both profiles. This quickly became confusing but was easily remedied.
- Once any Firefox profile is launched, you will not be able to launch another instance unless you have an Application Bundle that launches a different profile. Be aware that if you launch plain vanilla Firefox you’ll get warned that Firefox is already running. This makes the two Application Bundles necessary.
The tangled web I wove: This Lifehacker post on the topic is what set me down this path. Along the way, I finally ran across a MacRumors thread that gets the scripting syntax right. Now, if only I’d run across Asa Dotzler’s post on this same topic, I could have spent a few hours on Sunday doing something else, but feeling much less accomplished.
Update on an observed quirk: I added icons to my dock to launch my custom Application Bundles, but they behave weirdly. When they are launched, their respective dock icons do not have the dot next to them, indicating that they are running. There are, however, two additional Firefox icons at the bottom (dock is at left). These icons do have the “I’m running” dot. Huh.