Web Development
New Firefox 2 and Multiple Firefox Version Installations
Working on a team of Web developers lately, something keeps coming up in our browser testing: forgetting to test in older versions of Mozilla Firefox. This is becoming an even bigger issue as the Mozilla Foundation has just released the first beta of Firefox 2.0, Bon Echo. How do you install it and not wreak havoc or get messages about browser extensions and compatibility?
Firefox 2 Beta Links:
- Release Notes
- Asa Dotzler (QA lead) announement
- Discussion on Mozillazine
- On the Web Standards Project
Multiple Firefox Installs
The Mozilla Foundation made subtle changes to the rendering engines between Firefox 1.0.x, 1.5 (at the time of writing the production release), and now 2.0. Being early adopters, we developers have all upgraded. The users haven’t necessarily. Also, not thinking about it, frequently the upgrades were installed over top of the old version. Bang, we’re in the same position as testing with Microsoft Internet Explorer where we have only one version per machine. Not as severe due to market share, but still an issue if you’re serious about your UI development.
People make a big deal about how hard it is to get multiple installs of Microsoft Internet Explorer working, but it’s been an overlooked challenge so far with Firefox as well, because version to version the profiles it manages, and especially, if you use Firefox’s excellent extensions, have changed. In principle it is simpler with Firefox because you can start by simply installing into the directory of choice and executing the executable of choice. However, when the program runs it loads a profile which, in particular runs your extensions and may fail miserably disabling some, looking for updates etc.
You may have experienced this as you upgraded Firefox and it complained an extension wasn’t compatible. There’s a way around this, and it’s using the built-in features of Firefox’s profile support.
Option 1, Recommended: Multiple Profiles
Let’s assume because it’s current, you’ve got Firefox 1.5 installed to your “Firefox” folder. So let’s work back to Firefox 1.0.x.
First, I’d suggest whenever installing a version of a browser, especially when you can from scratch, install to a folder which is named for the dot-release that you’re working with. In this case, since you’re working backwards, create a folder for Firefox called “Firefox1.0.x”. When you install the next version, install to a “Firefox1.5”, “Firefox2”, and so on.
Next, create a command line shortcut with an added parameter to start the profile manager. If the default install under Program Files for Windows is followed, it’s as follows, but you’ll need to check your install directory:
“C:\Program Files\Mozilla\Firefox1.0.x\firefox.exe” –profilemanager
I like to keep a profile manager shortcut around to manage the profiles for Firefox in general, and keep in mind that it doesn’t matter which version you execute to do it, as they can all manage the profiles in your profile folder.
Execute (make sure Firefox isn’t already running, you can’t run the profile manager and Firefox at the same time) the shortcut and then either create a new profile or rename an existing profile to “Firefox1.0.x” (important: no spaces!!). It doesn’t matter what folder the profile is saved to, so skip that.
Install the software, and be sure to select “Custom” install so you can select the installation directory. Choose the folder you created above. Also, when you’re prompted for the Start Menu item, be sure to name it the 1.0.x version.
On your new install, right click on a shortcut to the newly installed version to get the properties option for the 1.0.x shortcut and change command line option to include the switch to use that profile:
“C:\Program Files\Mozilla\Firefox1.0.x\firefox.exe” –P “Firefox1.0.x”
This will launch that version of FF with the selected profile only. You may want to run the app with the “–safe-mode” qualifier on the shortcut as well, in order to specifically disable extensions which might prove to be trouble, but with a new profile, that won’t be a problem. That really only applies if you’ve renamed an older profile.
You’re not done if you’ve renamed your existing default profile (this might be done if you wanted to start fresh).
Run the Profile Manager again. Click “Create Profile…” You’ll get “Default User” as an option, and for your system to work correctly in most cases, you’ll want to use that for your newest version. Select “Don’t ask at startup”.
The “Default User” profile and the “Don’t ask at startup” is all that’s needed to get that user running each time you execute the program, so you don’t need to update any shortcuts with a profile switch for that profile.
Conclusion
You see a pattern here? Next time you upgrade and there’s extension issues, rename your default profile to something like “FF1.5.x” and then create a new shortcut, while also creating a new “Default User” profile.
You can optionally copy Bookmarks files etc as needed if necessary to the new profile folder so you don’t lose those.
With Firefox 2.o coming out, what I’ve done is kept my current install and Default User profile, but I created a FF2.x profile and associated that with that install to do my beta testing. Depending on what happens with extensions and profiles, I’ll rename that to “Default User” and rename my current profile to FF1.5.x”. Pretty slick.
Other Related Links
- Forum post on multiple installs
- Another blog post
- Mozillazine on profiles
- Files in profile folder
- Mozilla.Org: How to manage profiles
Option 2: Safe Mode Only
Another, simpler, option might be to always launch older versions of Firefox in what’s called “safe-mode”. This involves creating a shortcut with the command line parameter “-safe-mode” which will load the current profile but not run any extensions. I’ve had mixed results with this option as the sole solution, with the browser prompting for it to be the default application for HTML and HTTP shortcuts, so your mileage may vary.
Update: Just an update and final notes to this article.
Jul 16, 01:40 PM in Web Development (filed under Browsers)
Possibly Related Articles
Commenting is closed for this article.
justsome Jul 27, 10:08 AM #
Hmm. First: create a folder for Firefox called “Firefox1.0.x”.
Then: create a command line shortcut with an added parameter to start the profile manager.
“C:\Program Files\Mozilla\Firefox1.0.x\firefox.exe” –profilemanager
And then: Execute
How can I execute something in an empty folder I’ve just created?
rob Jul 28, 11:59 AM #
hey, good catch, that was an error.
that should be a shortcut to the currently installed version. i’ll try to update the article when i get some time.
bottom line, if you have an installed version you can run the profile manager from ANY installed version, so it doesn’t matter what folder you run it from as long as you’re pointed at a valid executable.
if you’re installing from scratch and have not installed anything, then the profilemanager parameter should be pointed at the one that’s just been installed.
dotjay Sep 13, 10:00 PM #
Hey, thanks for this. I followed this but found that Firefox 1.0 (running concurrently with 1.5) misbehaved unless I used the “complicated” batch file method mentioned on Hiveminds to launch 1.0 with its profile. Version 1.0 would fail to start without it.
rob Sep 14, 06:22 PM #
Yeah, I don’t bother, personally. I use Session restore and just close one, then open the other. Not a big deal to me.
andrew Nov 8, 11:21 AM #
I tried this but which ever version I start first is what version starts for all the others.. no matter what shortcut I run.
rob Nov 8, 03:03 PM #
Andrew, it sounds to me as though you’re trying to run both at the same time? Am I right?
As I noted this technique doesn’t work to allow both to run at the same time. I just close one then start the other for testing purposes. However, there’s another preferences hack needed to allow both to run at the same time, as linked in the comment above.
If not, please be more specific about the order in which you’re doing things. Good luck and let me know.
andrew Nov 9, 12:08 PM #
Ohh yeah.. I actually tried that first but it never worked cause I forgot to create that windows variable.. I left everything the way it was and just added that variable and it works perfect now
Im pretty sure I can do this for netscape too now since I know it works the same way.
Thanx a lot
Rob M Nov 22, 09:03 AM #
Thanks for the article. Everything seems to be working fine. Just a couple of questions.
1) I have set FF2 to be my default browser. Any webpage shortcuts open in FF2. How do i know if the webpage shortcuts are using the correct profile? (not that i have experienced any problems)
2) Is there any reason why you create a “default user” profile. Why can’t all profiles just be renamed the version of FF they are using? Is this because by using “default user” then you don’t need to use the -P switch?
Rob M Nov 22, 10:32 AM #
Further to my previous query, i have added different bookmarks to my different versions of FF. This then lets me know which profile is running as i can check which bookmarks are present. My web shortcuts (that i have placed on my desktop) open up a different profile to the one i want. They open up FF2 which is correct as this is my default browser but running with it is the profile for FF1.5. I know this is not really a major problem as i don’t often open FF from webpage shortcuts on my desktop, but i was just curious to know how this could be done. I presume i would have to go into Folder Options in Windows and File Types and edit the Internet Shortcut somehow.
rob Nov 23, 05:40 PM #
I’d have to double-check, and every time a new version comes out I go through this fresh.
As I commented in the article, maybe not obviously enough as it being key, is I think it has to do with the version launched from the profile manager with the “don’t ask me on startup” checkbox checked. Try messing with that. It was my impression that FF would launch, if no profile was specified, with the “Default User” or “Default” profile selected — but I think it is which you launch with that checkbox checked, as is indicated on this page here.
Let me know how it goes.
Rob M Nov 24, 11:37 AM #
Thanks rob, that sorted it. :) To change the default profile I did the following:
- Open profile manager
- Selected the profile I wanted as my default
- Made sure the “don’t ask me on startup” box is checked
- Clicked on “Start Firefox” (if you click on “exit” instead then the checkbox setting is cancelled. In other words the exit button appears to work like a cancel button.)
-Close Firefox
Now if I open up any shortcuts to a webpage it uses my default profile. This can be verified by having different bookmarks for each version of FF and then by checking which bookmarks are present so you know which profile is running.
I think you probably mentioned this in the article and I just didn’t understand it fully at first.
Shabbir Dec 29, 05:13 PM #
Good Article!
I just tried the profile switching and it worked well. While plying with multiple version of firefox installation, i came across a new way to keep all the browsers on the system installed and it’s simple:)
When installing a new firefox version, follow the steps below:
At the time of installation, wizard will ask you about the location of folder where to place the installation files. Create another folder (apart from 1st one where the 1st version is installed) in the program files and save it to that folder.
Also, the installation wizard will ask if want to creat shortcut on desktop and quick launch. At that time, just say no and go ahead with the installation.
As and when the installation is completed, navigate to the 1st firefox folder, create shortcut on desktop, change the name of shortcut. Now navigate to the 2nd firefox folder, create its shortcut on desktop, rename it with the version name like firefox 1.5.
This way 2 or more firefox version can be installed on the same machine but there is a catch, at one time, you can use one version of firefox, if you want to switch to another one, you have to exit the first one.
Thanks
Shabbir
rob Dec 31, 01:43 AM #
Hey Shabbir, the process you walked through is basically it, yeah. However, the problems arise when you have multiple extensions installed and are using the same profile, since extensions, bookmarks, and other features can be slightly different version to version, so your profile might be changed in a newer version and that will impact rolling back to an older version.
For instance, bookmarks and so forth are totally different in the new FF 3.0 Beta that is out right now.
Be careful. I plan on posting on creating multiple FF profiles on a Mac now that I’ve swithed. Another post.
Good luck!