Pages

Tuesday, December 27, 2011

How to setup a Firefox Test Environment

It happens often that I stumble upon an extension, tweak or tip for the Firefox browser that I’d like to try out. I could obviously try it out on the version of the browser that I use on a day to day basis, but possibility is there that it could lead to unforeseen issues. Issues include privacy or security problems, changes in the interface or browser behavior. And while it is usually not a problem to restore the old status quo, it sometimes can become a problem if that’s not entirely possible.

A Firefox test environment is the perfect alternative, as long as it does not share data with the default browser version.

This tutorial explains how to setup a test environment that you can use to test add-ons or tweaks without affecting the default browser that you use regularly.

A few options are available: A portable version of Firefox could be enough for some users, others may want to use a virtual machine or only a different profile.

The portable version is probably the easiest to setup, it should not pose difficulties even to inexperienced users.

Portable Firefox

You can download a portable copy of Firefox from Portable Apps. Just install the portable version into a directory on your machine. You will notice that you cannot launch the portable and regular version of Firefox at the same time, which can be a serious problem.

The startup parameter -no-remote makes it possible to run multiple instances of Firefox at the same time. There is however even an easier option for the portable version of the browser. Go to the FirefoxPortable\Other\Source directory and copy the file FirefoxPortable.ini into the root folder. Open the file with a text editor and change the AllowMultipleInstances value to true.

firefox multiple instances

You should now be able to launch Firefox Portable even if the installed version of the browser is already running.

firefox portable

You can now install add-ons and themes, modify settings and do other modifications that do not affect your default Firefox profile and installation.

The portable version has one disadvantage that needs to be mentioned. Everything that you change in the portable version remains, which means that you could run into a situation that you cannot recover the browser from. You could re-install the portable version, or keep a backup copy at hand to resolve the situation.

One Firefox, Two Profiles

The -no-remote parameter can be used to run multiple profiles that use the same Firefox core at the same time. Two steps are needed to complete the setup.

1. Creating a profile

You obviously need to have two profiles to run them at the same time. For that, you can use the new Profile Manager.

mozilla profile manager

Just select New to create a new Firefox profile and that it is linked to the right version of the browser. You also need to make sure that Start new instance [-no-remote] is selected under Launch Options.

You can start Firefox with the newly created profile directly from the profile manager. It is however not that comfortable to launch the profile manager every time you want to start the second Firefox profile. Here is what you can do to circumvent this.

Create a new Firefox shortcut. Windows users can open the Firefox installation directory in Windows Explorer (C:\Program Files (x86)\Mozilla Firefox\), right-click firefox.exe and select the create shortcut option from the context menu. The shortcut is either placed in the same directory or on newer versions of Windows on the desktop.

Right-click the shortcut and select Properties. Locate the Target line and add the following parameter to it at the end: -P profilename

Replace profilename with the name of the profile. If you are not sure how it is named open the Profile Manager again and take a look.

Click ok to apply the changes. I suggest you rename the shortcut as well to avoid confusion. If you have done everything correctly you should be able to launch a second instance of Firefox on your computer.

This method has the same disadvantage as the portable version environment. Everything that you do remains, which may lead to unrecoverable issues.

Virtual Machines, Sandbox

Virtual machines or sandboxing is the third possibility. This is usually more complicated to setup but has the advantage that changes are only temporary. You can use free programs like VMWare, Microsoft’s Virtual PC or the excellent Sandboxie.

You could use a Firefox browser appliance for VMware. Please note though that you need to update the browser as it uses an old version of Firefox (Firefox 8 at the time of writing).

To use it, you first need to install VMware on your computer. To run the browser application do the following:

In the VMware Player dialog box, browse for Virtual Machine Configuration File, browse to the directory where you installed the Browser Appliance, select the file Browser-Appliance.vmx, and click Open.

Closing Words

Users who test a lot benefit from setting up a test environment. This opens up lots of possibilities. You could run a cutting edge test environment, e.g. with the latest nightly versions of the browser to test your web pages and applications against it, or the same version as your standard profile is using.

Are you making use of different profiles in the browser? And if you are, for what purpose? Let me know in the comments.


© Martin Brinkmann for gHacks Technology News | Latest Tech News, Software And Tutorials, 2011. | Permalink |
Add to del.icio.us, digg, facebook, reddit, twitter
Post tags: ,



0 comments:

Post a Comment