May 20th 2015

Using multiple Firefox profiles on OS X

If you’re developing Firefox extensions, it may be useful to have multiple profiles: one for every day use containing the extensions/setting you use regularly, and another as a development environment. Separate profiles ensure that if you accidentally break something during development, your usual browser environment will remain the same. I’ve found this to be particularly useful so thought I’d write a post about it. Before I get started, I should point out this post is geared towards OS X users.

First of all, you will need to access Firefox’s profile manager tool. To do this, type the following into the Terminal-

/Applications/Firefox.app/Contents/MacOS/firefox-bin --profilemanager

This will cause the Profile Manager window to appear. If you’re already a Firefox user, your default profile should appear. Click on the Create Profile button to make a new profile. Give it a name (remember this name) and choose the folder in which you wish to store your profile information. For the purpose of this post we’ll call our profile “devProfile”. That’s all there is to creating a new profile however, if you wish to use it as a development environment, you must launch it with Firefox. The next part of this tutorial will show you how to create a second instance of Firefox for your development profile.

Open the Script Editor app. On Yosemite, this can be found in Applications > Utilities > Script Editor. Type in the following-

do shell script "/Applications/Firefox.app/Contents/MacOS/firefox-bin -P devProfile"

When typing in the script, watch the quote- ensure they are regular double quotes, rather than smart quotes. Save the file as an Application. Now we need to Info.plist file. This can be found by right-clicking on the Application you just saved > Show Package Contents > Contents. Find these 2 lines-

LSRequiresCarbon

Under the true tag, add the following 2 lines-

LSUIElement
1

LSUIElement is a Launch Key in OS X. Launch keys help to launch apps and figure out which apps should open certain document types. According to Apple’s Documentation, LSUIElement Specifies whether the app is an agent app, that is, an app that should not appear in the Dock or Force Quit window.

That’s really all there is to it. You can change the icon on the new Launcher Application you have just created (or leave it as the default script icon, but that’s a bit boring). When clicked, the Application will cause another Firefox icon to appear in the Dock. This instance of Firefox will launch with the development profile you created.

Of course, an alternative way of launching a new instance of Firefox with a development profile is to use the Automator app.

No Comments

No comments yet.

RSS feed for comments on this post.

Leave a comment

Note: Comments will not appear on the website until they have been moderated.