One of the great features of Firefox is the ability to manage multiple profiles. This is a very handy feature with many different uses. Unfortunately, it isn’t easy to do on a mac. I will show you how to setup multiple profiles on a mac that appear and run like normal mac applications so you can click on them and run them from quicksilver.
UPDATED 10/16/09 : Now working with Snow Leopard!
Firefox is a great browser in any operating system. One of the great features of Firefox is the many extensions that can alter or add functionality to the browser. If you are like me, you use quite a few extensions. While these extensions make life easier, they also slow down firefox. I use two different profiles, one with all my extensions loaded, which I use for work. And one without any extensions which I use for light browsing, watching videos and checking mail.
Setting up your profiles
So we will use the Terminal, but just once here. Fire up the Terminal, it is found in Applications << Utilities < < Terminal. And run the following:
/Applications/Firefox.app/Contents/MacOS/firefox-bin --profilemanager
A window will appear. Create your profiles. I created two called "Heavy" and "Lite". Whatever you call your pofiles, write it down and remember the names are case sensitive.
Creating the scripts
You will want to repeat the following for each of your profiles
- Open the script editor
- Add the following line replacing profileName with your profile name.
do shell script "/Applications/Firefox.app/Contents/MacOS/firefox-bin -P profileName"
- Save the script as an Application Bundle. I called mine FFHeavy which seems to work well
- Control-click the icon < Show Package Contents. A "Contents" window will appear.
- Edit the file Contents < Info.plist with your favorite editor
- Look for the entry < key>LSRequiresCarbon</key> <true/>
- Add these two lines after that entry.
<key>LSUIElement</key> <string>1</string>
- Save the Script
Changing the Icon
By default your newly created script will have a "script" icon, not all all representative of what it does. Let’s change that to a more relevant icon.
You can use any image you want. I found a good one on gnome-look. Unfortunately OS X requires icons to be in the icns format. There is a handy Opensource application that can turn images into icns files. img2icns from shinyfrog. Png files work well as they are already 24 bit and transparent.
Run img2icns and drag your png file(s) onto the dock icon for img2icns. It will place the newly created icns file on the Desktop by default. "Get Info" on the script you created and drag the icon onto the icon towards the top of the get info window.
You now have a working icon and alias/script/shortcut to your profile


















Thanks
I had to search the entire web for this gem, but it was worth it! Thanks!!
no go for me :-(
thanks but im dragging an icns file onto the sport you mention and it does nothing.
also the new app bundle on the deskrtop, i cant drag it into the dock and then delete the icon on the desktop else it doesnt work...
any advice appreciated
cheers,
jed
re: no go for me
Converting to ICNS files using Tiger (OS X 10.4)
OS X 10.4 users won't be able to use that application. Instead, they can use this on-line app:
http://eisbox.net/iconvert/
Very handy for small batches.
works great, but...
the browser always loads hiden behind any other applications which are active. Any ideas???
Thanks! Task Bar Icon?
So I _think_ I followed your instructions correctly. There were a few checkboxes on export (Options: Run Only, Startup Screen, Stay Open) that you didn't mention in the article.
I was able to set the Icon and set the LSUIElement in the Info.plist. However, upon launch, the icon for Firefox in the Dock and in the CMD-Tab switcher is still the original Firefox. As I read about LSUIelement, it should allow the icon we set for the script as the icon for the app. Am I mistaken? Are we just making a pretty icon for the profile, but not one that passes on to the running app?
Thanks!
Firefox 3.5 @ OSX
Correct
The icon we are creating is only for the script. The running firefox will still retain the normal icon and name.
Snow Leopard compatability?
firefox-bin quit unexpectedly.
then a dialog box with profile name as window header,
dyld:Library not loaded: /usr/lib/libsqlite3.dylib
Referenced from /System/Library/Frameworks/Security.framework/Versions/A/Security
Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0
/Applications/Firefox.app/Contents/MacOS/run-mozzilla.sh:line131: 1136 Trace/BPT trap
"prog" ${1+"$@"}
Second the above!
I have the exact same problem. Any fix?
Me Too
I just upgraded to Snow Leopard and am also experiencing the same issue. I'll post an update once I've found a fix. Hopefully it's soon, cause I really grew to depend on this working.
Snow Leopard Solution
Ok, Did some research on this. There is a problem with Firefox 3.5 in Snow Leopard, documented here and here. Unfortunately neither suggests a stable fix… However there is one, and it’s really simple…
Change the script to read
Note the additional "-bin".
That should work for you.
Workaround for the icon
there is one, but it'll be a little annoyng when you upgrade your FF:
On applications folder, copy and paste Firefox.app, rename it to something simple like: Firefox2.app :)
Right click it, choose Show Package Contents and navigate to /Contents/Resources.
Move your new firefox.icns icon there and close it.
When making the Apple Script, just change the Firefox name to the one you created, in my case the script would be:
do shell script "/Applications/Firefox2.app/Contents/MacOS/firefox-bin -P Profile"
I know it's not the easiest, but i think it's much better to have two different icons other then having to read each Firefox tab name when I'm alt-tabbing :)
BTW, thanks for this great tip :)
Post new comment