Open several profiles and several windows in each profile at the same time
I have two profiles named "work" and "home". For each profile I've created a hotkey in Windows that starts Firefox with requested profile. Hotkeys point to batch files with one line: @start firefox.exe -p "profile name" -new-window
My issues are: 1. when I have an open window with home profile and request to open a new window with work profile, a new window opens with home profile. This issue can be resolved with -no-remote, however 2. when I add -no-remote I cannot open two windows with the same profile using hotkey (i.e. batch file) as it says "Firefox is already running, but is not responding. The old Firefox process must be closed to open a new window".
I tried using -new-instance switch but it didn't work. I tried standard (Firefox 38.0.1) and developer (Aurora 40.0a2 2015-05-18) editions under Windows 7.
Is there way to open a new window with requested profile no matter what windows I have open?
All Replies (3)
Don't need a batch file to launch multiple, simultaneous Profiles. firefox.exe -p "profile name" in the Target line of a desktop shortcut works fine, and that is the intended usage for the -no-remote command. Like this firefox.exe -no-remote -p "profile name" to launch the 2nd Profile as explained below. But if you are using Firefox as your default browser, it's not advisable to use the -no-remote command with the default Profile (as shown in the profiles.ini file) as it causes issues. The default Profile will launch fine if the 2nd Profile is already running, even without the -no-remote switch.
Skip using that batch file to open a new window when a Profile is already running. The -no-remote command is for opening the Profile, not for opening a new windows for a running Profile. Try opening a new window for each Profile from within the Profile using { Ctrl + N } or by using the various Open New Window menu items.
Thank you, but it does not work. The default profile launches fine only if the second profile is running as -no-remote. Ctrl+N and various Open New Window menu items do work, however this is not a point. To use Ctrl+N I have to switch to open instance of Firefox and then press Ctrl+N. The idea is to press system wide hotkey to open new browser window from any application and this one doesn't work if there is another open window.
Sorry, what you want to do via that batch file just isn't going to work with Firefox. You can't run that batch file with -no-remote once a Profile has already been launched and is running. -no-remote is dependent upon the Profile not having a "lock" file in it and the parent.lock file is present (0kb) whenever a Profile is running. And it is needed to open a 2nd or subsequent version / Profile.
As far as the default Profile goes, if -no-remote is used to launch it other programs that want to open the default browser will throw the "Firefox is already running" message or nask you which Profile to use. At least that is the consensus of experience over at the MozillaZine fora where most of the advanced Firefox users who run multiple, simultaneous Firefox Profiles "hang out". Mozilla doesn't officially recognize that -no-remote command in this forum. It is considered a command for very experienced users / developers who understand how it works.
May be a 2nd batch file with for a Profile will work with -new-window, but I have never done that to open a new window - I just bring focus to the window / Profile where I want to open a new window and hit {Ctrl + N}. Typically I am running separate Profiles with different versions of Firefox; not the same version with different Profiles, as you are doing. But there's no real difference - with any version running the -no-remote switch is needed to open a 2nd or subsequent Profile running any version of Firefox.
Or maybe use the Windows Remote command line variable system wide like Firefox users had to do before the -no-remote command was added to Firefox in 2005 for Firefox 2.0 nightly development version. It's been at least 10 years since I had to use Remote thru Windows (W2K and before that Win98) and don't have my old notes on how that works, and my recall for the "tricks" with that Windows command are fuzzy - don't even know where to insert that command on WinXP or later Windows versions.
Bottom line - you need to modify or adapt your approach a bit from what you have posted, to get it to work. Since my suggestion isn't what you need, play with it and come up with your own solution.
http://forums.mozillazine.org/viewtopic.php?f=23&t=2821799 At the botton of that thread are links to older versions of that thread; the earliest links - v1 and v2 have input from other users who have played with multiple, simultaneous Profile going back many years.