It can often be useful to have multiple Firefox browsers open at the same time. Particularly for testing web sites or any sort of web development. Or even just so you can be logged into two sites at the same time with different accounts.
Firefox provides such a feature with the -no-remote switch. The first step is to create multiple Firefox profiles. To do this, launch Firefox with the -ProfileManager switch.
On Windows click Start > Run then:
"C:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -ProfileManager
On *nix launch the command:
firefox -ProfileManager
Then create a new profile. If you want to make a copy of your existing profile, simply create the new profile, then copy the current profile directory to the new profile directory.
Now you’re ready to launch Firefox with the -no-remote switch. The trick is that you need to select your second profile when you launch your second instance. So start Firefox as normal, then launch a second browser.
On Windows click Start > Run then:
"C:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -P "secondprofilename"
On *nix launch the command:
firefox -no-remote -P secondprofilename
Bingo, now you should have two separate Firefox windows, each running independently of each other. If you click on links in another program, they will probably go whichever Firefox window you opened first. Enjoy. More info.
Just what I was looking for. I added the no-remote switch and now it works, only problem is, it still continues to load the already loaded profile in the second instance as well…
@thunderror: I’m not sure what you mean. It should load different profiles in each instance. As far as I’m aware, you can’t load the same profile in two instances simultaneously.
Very helpful, works like a charm. A second instance of Firefox in my startup menu now opens Craigslist searches for all items I’m patiently waiting to find at bargain prices…
Thank you man, that is I was looking for. Suits perfect!
Pingback: Firefox Blog
Pingback: Setting Up a Clean Firefox Profile : touchground.com
Pingback: Всем привет, aka Hello world! | My WebDevel blog
Thanks, I was actually searching a way to launch firefox instance from remote system (on Linux through SSH connection with X Windows forwarding) but when I had firefox already running locally it would detect firefox running on same display and made remote call to the locally running instance and just open new window (or profilemanager of local systems firefox if that parameter was used.
I already knew -ProfileManager but what really helped me in your article was the no-remote parameter. Thank you!
Is ProfileManager a program I need to download?
No.
I was looking for this info thanks a bunch
ok, working good. is there a way to make shortcuts for version 3.6 for both accounts to make it easier to get into?
On which operating system?
Very helpful. Thanks for posting this!
Whenever I do this and try to open both profiles I get a message that says “Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.”
That sounds like the –no-remote flag is not working properly. Try searching for firefox –no-remote, that might turn up some answers.
It’s fixed now. I had a two name profile name set up, deleted it, and made a new one with the same name, but no space inbetween the names. Looks like if the profile has two words in it, they need to have an underscore between them like Jane_Doe and it is case sensitive.
I think profile names are case sensitive, and spaces are probably ok, but you’d need to surround the name in quotes when you run the command, so you’d run
firefox --no-remote -P "profile name". Either way, it’s always simpler to use underscores, that avoids all the hassles.Hi callum pls can you tell me how to install this on windows 7 it worked fine at vista but couldnt fix it with windows 7 …
Thank you for the advices
sincearly
I have no idea about Windows, I haven’t used Windows for years and I’m glad to have never owned a Windows Vista or 7 computer.
As far as I’m aware, you really don’t need to install anything, it’s just part of Firefox automatically. But to be honest, on Windows, you’re on your own, I focus my support energy on GNU/Linux users.
On Windows click Start > Run then:
“C:\Program Files\Mozilla Firefox\firefox.exe” -no-remote -ProfileManager
Hi again sorry but just wonder how i can do this on windows 7 ,dont know how to do that dont have run option on windows 7.
Tried to past it to command but didnt work
Thank you again for your answer
I’m a linux user like Callum, but if memory serves me well, try to search for ‘run’ in the start menu. it should be the topmost result.
Oh, and you could try pressing the WindowsKey – R, that used to work on older versions of Windows.
Fix that problem ::)) thank you
Thanks, works a treat for multiple profiles.
Windows 7… in the Start Menu Program search box type “Run”, select Run from the list, then “firefox.exe -no-remote -profilemanager”
Thanks buddy, i am using Auto surf programs, and the ram goes up at 1gb ram with easy, need another instance to run small stuffs which does not eat that much and i have enough ram to run more profiles.
This is sweet, I was trying to follow earlier instructions from others where the profile manager was a separate executable file, your info on the program switches was what I needed. This is vital to run two accounts with two different names in the same game, since cookies are saved to get you into the right account… Thanks for your help.l
I’ve been using a similar command for some time but with the added option of -private e.g
start “” “C:\Program Files\Mozilla Firefox\firefox.exe” -private -no-remote -P Myprofile
This worked fine on firefox 3.6…. one firefox session would open in private mode
However….. on firefox 4.0 two sections of the same profile would open, one normal and one private ?
Any ideas, I guess this is a bug in firefox4?
Cheers R
Not sure, maybe the flag changed for private browsing in FF4. Does Firefox load as expected without the -private flag on FF4? I’m really not an expert, not sure what to suggest.
Any updates on this one?
I have the same problem: “…-P secondprofile -private” opens one normal and one private window.
Need to get rid of the normal window on startup
Other than that, fabulous info. Thank you Linux guys
(Win7)
Personally, no idea. I just tested on Ubuntu and I see the same behaviour, two windows open, one private one normal. If you want to browse private all the time, you could create a profile specifically for that and turn off everything (kill cookies, history, etc, etc). I’m not very familiar with private browsing, but I think it would come to the same thing.
Still works like a charm.
I am now running Firefox 3.6.17, Firefox 4.0.1 and Firefox Nightly at the same time on my Win 7 VM.
Thanks for sharing
I’m so glad I found this ability. I like the idea of separating my private browsing windows from my non-private browsing windows. The one thing that Google Chrome does well.
Callum, your tutorial lets me do exactly what I wanted. Thanks again
mira a mi no me hace nada me dice no se encuentra ningun elemento coincidente lo con el criterios de busqueda. que puedo hacer?
Hi, I tried this with cometbird browser which is also made mozilla and it worked great. I need to know if there is a way to be able to use greasemonkey and user scripts in the second instance of the browser. Everything seems to work fine except for that.
Please let me know, I even installed greasemonkey and the scripts on the second instance and they just don’t do anything.
Thank you.
If you’re asking me, I have no idea. Perhaps somebody else will see your question and reply, but somehow I doubt it, this is not a very popular blog post.
I can add that greasemonkey works fine for me in multiple profiles in every version of Firefox since 3.x.
i have greasemonkey on my first account, but it’s not letting me download it on my 2nd account…
Thank you for the reply. I think I am having trouble with greasemonkey in general. I am going to try using scriptish instead and see how it goes. Thanks again for the info on how to do this.
I have it working now. Awesome, thanks so much for this.
It works great in indows 7 but i want to call an imacro from command line,one for profile 1 and another for profile 2.For the first profile its ok but for the second profile it doesn t work
Thx alot, been searching for that info, methods old tutos don’t work in 7.1.
This seems to work for now
Strangely the new profiles cannot access https sites. Other sites work fine but https fails for some reason.
Can you create two instances of Firefox without creating two profiles? Currently if i open a website with two instances of Firefox, the contents generally merge. however if i create two profiles then it works fine.
No. Each instance needs a separate profile because you can’t have two sets of session cookies, etc in the same profile.
Awesome tutorial! It’s amazing what (undocumented) commandline options exist to make life for people like us a teensy tiny bit easier. :p
Thanks to you, I now run a proxied and unproxied FF instance on my main PC without a problem, where earlier I had to look at alternatives to FF to do so. (F*** Chrome, Opera or IE… they really really don’t work for me.)
You’re a lifesaver. ^-^
Thank you for the amazing tutorial. I really needed this.
Is this possible to add the shortcut to the desktop instead of doing this every time?
On Windows click Start > Run then:
“C:\Program Files\Mozilla Firefox\firefox.exe” -no-remote -P “secondprofilename”
I’m not a windows user, so I’m not sure how you’d create the shortcut, but I’m sure it’s possible. Glad the writeup was useful.
Yeah It is possible. Actually this was mentioned in the link which you provided. So I would like you to thank you again.
http://kb.mozillazine.org/Command_line_arguments
“If you regularly wish to start your application using command line arguments then you can also create a shortcut on your Desktop which includes them. To do this, right-click on an open space of the desktop and choose “New -> Shortcut”. Follow the wizard to create the new shortcut. When it prompts you for location (not name), type the file path and file name followed by the command line arguments, exactly as in the example above. “
I’ve been using this for years on Ubuntu. Until recently, clicking a link in Evolution or using “Open Link” from a right click on an URL opened the page in the first Firefox that I opened. Recently, in the past month or so, I get the “Firefox is already running, but not responding” error. My setup is unchanged, but Firefox has been updated.
Anyone else see this? Anyone found a workaround?
Thanks!
I have noticed the very same thing in the last couple of days since I upgraded to Precise (12.04). I wonder if it’s a bug in the new version of Firefox, I’m now on 10.0 since upgrading. If you find a solution, please do post it here or let me know. I’ll do likewise. No doubt at some point (once I iron out the other bugs!) I’ll get round to look into into it.
I’m still running Ubuntu 11.04 (I HATE Unity), and my Firefox is version 8.0. I’m guessing the update to 8.0 is when the problem showed up.
Likewise, I’m really not a fan of Unity. I like the ideas, but in 12.04 alpha, much of it is still pretty ropey. The run dialog, for example, don’t even get me started! I didn’t notice this behaviour before upgrading, and I’m pretty sure I was running FF 8 or higher. It could be tested in a VM running an older Ubuntu / Firefox, see if it arises at a certain point. Does the same behaviour occur if only one instance is running?
The biggest problem for me with unity is the switch to application focus instead of task focus. For my job, I have 10 workspaces and I usually have 30 or more terminals open, 1-4 per task I am working on. With Unity (and gnome 3) all the terminals are combined into one and I cannot keep track of what I am doing.
The error does happen with only one firefox open.
I wrote a little script to work around the problem. Save the script somewhere in your PATH as start_firefox. Then change your menus to call start_firefox instead of firefox and remove the -no-remote.
For example: start_firefox -P work %u
Here is the script:
#!/bin/sh
running=`pgrep -x firefox`
if [ -n "$running" ]; then
firefox -no-remote $@ &
else
firefox $@ &
fi
Interesting. I’ve done some experimenting. Calling
`firefox http://url/`will always open a new tab with the link. However, when the first firefox instance is started with –no-remote, clicking a link appears to launch`firefox --no-remote http://url/`which will not work. The –no-remote flag cannot be used with a url if firefox is already running. I’d guess this bug lies somewhere with Ubuntu’s method of sending urls, but that’s something I know nothing about. Maybe there’s a way to modify that.Thanks for posting your script. I’ll start firefox without –no-remote for the first profile by hand, I always start it from the run prompt anyway. Good to know there is a solution, thank you kindly.
I figured out to control how Ubuntu launches URLs. In Preferences->Main Menu->Internet the “Firefox Web Browser” that was put there by the system determines how Ubuntu launches URLs. I changed it to xterm and clicking a link opens an xterm. You can rename and move that item, and it still performs the same function.
So you do not want to change the command for that one. What I did was change the name of that one to “Firefox (preferred application)”, changed the icon, and moved it further down the list. I added a new entry called “Firefox” and set the command to “start_firefox -P default %u”.
Now everything is working like it used to work.