Sunday, January 28, 2007

Running more than one Firefox instance in the same X

It's sometimes really handy to run two or more Firefox instances simultaneously for testing purposes or the likes. This seems to be impossible since Firefox allows only one instance of it per user session. Running multiple "firefox" commands just creates new windows which share the same session data (cookies, authenticated sessions...)

Thanks to Linux, SSH and the X architecture which together make running multiple instances of Firefox in the same screen possible.

Step 1: Start your X and login with an account, start the first Firefox instance.
[dgthanhan@localhost ~]$ firefox&
Step 2: SSH to your own localhost using another account with X tunneled
[dgthanhan@localhost ~]$ ssh -X monkeya@localhost
monkeya@localhost's password:
Last login: Sat Jan 13 02:11:45 2007
/usr/bin/xauth: creating new authority file /monkeya/.Xauthority

Step 3: Start the second Firefox instance by invoking "firefox". Enjoy :)
[monkeya@localhost ~]# firefox&
(Note: This guide is only for *nix user)

No comments: