MozillaZine

Run multiple instances in Linux

From MozillaZine Knowledge Base

On Linux systems, you can run more than one instance of Firefox. Each instance will have its own cookies, etc, which is useful for debugging web applications. While Firefox is running, execute

firefox -a firefox -remote "OpenURL('http://your.homepage.here',new-window)"

You can also use the following script instead of typing that line every time. You need to modify the FIREFOXPATH variable to point to your Firefox installation folder.

#!/bin/bash
# Copyleft ! 2004 Carl Forstenberg

#Tiny startup-script for MozillaFirefox

FIREFOXPATH=/opt/MozillaFirefox/
FIREFOXNAME=firefox
URL=${1:-'http://your.homepage.here'}

FIREFOX="$FIREFOXPATH$FIREFOXNAME"
if [ -x $FIREFOX ]; then
	$FIREFOX -remote "ping()" &> /dev/null
	if [[ "$?" == "2" ]]; then
		$FIREFOX $URL &
	else
		$FIREFOX -remote "OpenURL($URL,new-window)" &
	fi
fi