For ages I've been using the 'MOZ_NO_REMOTE' environment variable to run two instances of Firefox or Thunderbird. I've used in Linux too, but it only works when I've extracted binaries to my own folder - I could never get it to work with an apt-get supplied install - ie in /usr/lib/firefox
However I've just discovered the -no-remote switch. Apparently it's existed since at least 2006 but I never knew about it. Now no need for scripts - all that's needed is a shortcut of the form:
firefox-3.5 -no-remote -p profilename
Or I prefer to select my profile from the dialog that comes up using:
firefox-3.5 -no-remote -p
On a vanilla install that would be 'firefox', not 'firefox-3.5'.
You can run two profiles, same version, or you can test new releases or nightlies without closing your regular browser.