Renamed executable: "Firefox is already running"

User Help for Mozilla Firefox
Post Reply
Jay Levitt
Posts: 14
Joined: September 23rd, 2004, 10:05 pm
Location: Wellesley, MA
Contact:

Renamed executable: "Firefox is already running"

Post by Jay Levitt »

I work at home, and I'm trying to separate work browsing from play browsing so I can use the excellent Interuptron to track my productivity. Among other things, it will automatically consider me to be "interrupted" if I use specific applications, so I need two firefox executables, not just two profiles.

I have created two Firefox profiles, called "Work" and "Play". Specifically, they are in <code>C:\Documents and Settings\Jay Levitt\Application Data\Mozilla\Firefox\Profiles\</code>, named <code>fi7tdwnw.default</code> and <code>ctgcaea7.Work</code>.

I then created two executables, identical except for their icon, in <code>C:\Program Files\Mozilla Firefox</code>, named <code>ffplay.exe</code> and <code>ffwork.exe</code>.

I set up two Windows shortcut .LNK files:

<code>ffplay.lnk</code> launches <code>"C:\Program Files\Mozilla Firefox\ffplay.exe" -no-remote -p Play</code>
<code>ffwork.lnk</code> launches <code>"C:\Program Files\Mozilla Firefox\ffwork.exe" -no-remote -p Work</code>

Since I can't force other applications to launch Firefox via these shortcuts, I instead set ffplay.exe to be the default. Since it was (by default) asking me to choose a profile, I told it to save the Play profile and not ask me again. <code>C:\Documents and Settings\Jay Levitt\Application Data\Mozilla\Firefox\profiles.ini</code> reads as:

Code: Select all

[General]
StartWithLastProfile=1

[Profile0]
Name=Play
IsRelative=1
Path=Profiles/fi7tdwnw.default
Default=1

[Profile1]
Name=Work
IsRelative=1
Path=Profiles/ctgcaea7.Work


I told ffplay to set itself as the default browser, and it seems to be, according to this Sysinternals Process Monitor output when I select "Check Now":

Code: Select all

11624   10:54:21.6668784 AM   ffplay.exe   716   RegQueryValue   HKCR\HTTP\shell\open\command\(Default)   SUCCESS   Type: REG_SZ, Length: 130, Data: C:\PROGRA~1\MOZILL~1\FFPLAY.EXE -requestPending -osint -url "%1"

(among other similar entries)

This all seemed to work fine, until I tried clicking a link in Thunderbird, at which point it told me that "Firefox is already running, but not responding". I verified that this isn't specific to Thunderbird; launching <code>ffplay.exe</code> directly from <code>CMD.EXE</code> (with no parameters, or even with -no-remote) gives the same error. I don't even have an <code>ffwork.exe</code> instance running.

I've tried using Process Monitor to trace what Firefox does when that happens, but, frankly, it does a <i>lot</i>...

I've seen some old threads on the topic, but they were all pre-2.0. Just for grins, in case Thunderbird was looking for <code>firefox.exe</code>, I created an NTFS junction for <code>firefox.exe</code> pointing to <code>ffplay.exe</code>, but given that it happens when I launch ffplay directly, I don't think that's related (and it didn't help, anyway).

Any ideas?
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Post by SK. »

I think what you are seeing is the effect of trying to use two instances of the executable when that is not the only file an application looks for to determine if it is already running. Forcing an application to launch more than once can wreak havoc - memory locations can be presumed to be reserved for that application, temporary files can be written, etc. All of those can become corrupted if you are forcing an application to do just what you suggest. I have the following suggestions, none of which are going to satisfy your desires (sorry):

- Use another browser for your lesser (in terms of time) browsing - Opera, SeaMonkey, etc.
- Determine by another means how much time you spend on the Internet in "Work" mode vs. "Play" mode over a period of a week or two and manually adjust your productivity tracking to reflect the difference.

It seems like a lot of effort to track productivity, rather than by looking at the end work product.
John 3:16 and Philippians 4:13
User avatar
Vectorspace
Moderator
Posts: 14455
Joined: November 27th, 2003, 4:50 am
Location: Warwickshire, UK
Contact:

Post by Vectorspace »

Normally, if you have Firefox running and you try and start another instance of the process, the new firefox process is redirected to a new window in the already running process.

If Firefox was started with -no-remote this will not happen - instead a link will launch a whole new process with the default profile. If the default profile is in use you will get the Firefox is already running message.


The solution is to never start your default profile with -no-remote. Always start that one normally and launch all others with -no-remote. Then it will work.
If Play is your default profile, always start it without -no-remote.
"All things being equal, the simplest answer is usually the correct one" - Occam's Razor
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0
User avatar
alterna
Posts: 3993
Joined: January 16th, 2007, 8:27 am
Location: Big Apple

Post by alterna »

You can have problems if all exes are -no-remote: you need one exe vanilla to launch external links in FF.
"So it goes" - Kurt Vonnegut, Jr.
Jay Levitt
Posts: 14
Joined: September 23rd, 2004, 10:05 pm
Location: Wellesley, MA
Contact:

Post by Jay Levitt »

SKopischke wrote:I have the following suggestions, none of which are going to satisfy your desires (sorry)


Hey, that's the nature of forum and usenet posts! :) Soon, someone will tell me that (a) I don't really want to do what it is I want to do, and (b) I should switch to Linux anyway.

It seems like a lot of effort to track productivity, rather than by looking at the end work product.


Actually, "track" is the wrong word; Interruptron enforces productivity. It's like a chess timer, with "working" and "interrupted" clocks. It's normally very discreet, but if you're supposed to be working, and you start down the rabbit trail of distractions, the interruption clock will not only start ticking automatically, but slowly get bigger and bigger and blinking in red until, in half an hour or so, it takes over your entire screen. It's brilliant (and free).
Jay Levitt
Posts: 14
Joined: September 23rd, 2004, 10:05 pm
Location: Wellesley, MA
Contact:

Post by Jay Levitt »

Vectorspace wrote:If Play is your default profile, always start it without -no-remote.


Ah hah! Yes, that works perfectly. I'd assumed that if I left -no-remote off of Play, then launching Work before Play would end up opening a new tab in Work. I see now that that's not the case; I can launch them in either order.

I think I was thinking of -no-remote backwards. It doesn't mean "don't go launch a process", it means "don't accept remote requests from other processes".
Jay Levitt
Posts: 14
Joined: September 23rd, 2004, 10:05 pm
Location: Wellesley, MA
Contact:

Post by Jay Levitt »

OK, new, related problem: Clicking on mailto: URLs from Work Firefox gives me a "Thunderbird is already running, but not responding" alert. I assume that this is because Work Firefox is (and must be) launched with -no-remote, and that ends up affecting the way it launches Thunderbird? (I'm using FF 2.0.0.11 by the way.)

Is there a way around that by making it launch Thunderbird via command-line instead of magic-Mozilla-XPCOM-whatever?

mozillaZine: Register protocol implies (and the Talk page seems to confirm) that network.protocol-handler.app.mailto is ignored on Windows. The corresponding registry entry is:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\mailto\shell\open\command]
@="\"C:\\Program Files\\Mozilla Thunderbird\\thunderbird.exe\" -osint -compose \"%1\""


<code>network.protocol-handler.external.mailto</code> is already <code>true</code>. <code>network.protocol-handler.expose.mailto</code> was <code>false</code>, but setting it to <code>true</code> didn't help any.
User avatar
dickvl
Posts: 54163
Joined: July 18th, 2005, 3:25 am

Post by dickvl »

Only use the -no-remote switch for a second Firefox instance.
You can't open an external link in a Firefox instance that is launched via -no-remote.
The only way to do that is to drag the link in the Firefox window.

You need to launch the default Firefox profile without the -no-remote switch.
See: http://kb.mozillazine.org/Opening_a_new ... er_profile

Only these two work in windows, Linux, and Mac:
http://kb.mozillazine.org/Network.proto ... al-default
http://kb.mozillazine.org/Network.proto ... rotocol%29 (network.protocol-handler.external.mailto)

These two do not work in Windows (only in Linux and Mac):
http://kb.mozillazine.org/Network.proto ... rotocol%29 (Mac,Linux)
http://kb.mozillazine.org/Network.proto ... rotocol%29 (Mac,Linux)
Jay Levitt
Posts: 14
Joined: September 23rd, 2004, 10:05 pm
Location: Wellesley, MA
Contact:

Post by Jay Levitt »

Only use the -no-remote switch for a second Firefox instance.


Yep, that's working now. ffwork.lnk runs "ffwork.exe -no-remote -p Work". ffplay.lnk runs "ffplay.exe -p Play". ffplay.exe is the default browser in the Windows Registry. "Play" is also set as the default profile in profiles.ini, and ffplay.exe is also NTFS-linked to firefox.exe.

You can't open an external link in a Firefox instance that is launched via -no-remote.


Aw, shucks. Is there a different way (short of a virtualized Windows session) to have two executables, running two different profiles and themes, independently, both of which are able to launch mailto: links? Or is that just the way it goes?
vanemaribel
Guest

"Firefox is already running"

Post by vanemaribel »

I use multiple profiles and when i use 2 or more profiles at the same time, i can't open a new window using the shorcut in any of the profiles because it 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" Maybe it could be common when one use multiple profiles except for the fact that I used to work in a computer with multilple firefox profiles and everything went really well, I didn't have any problems, never, but the person who did this is not working anymore and I can't ask him for help. Please help me!!! :)
User avatar
Vectorspace
Moderator
Posts: 14455
Joined: November 27th, 2003, 4:50 am
Location: Warwickshire, UK
Contact:

Re: Renamed executable: "Firefox is already running"

Post by Vectorspace »

This thread has been dead for 10 months before you posted - it is against forum rules to bump old threads, it is better to start new ones.

There are a large number of solutions listed in this thread for your problem, did you try any of them? What were the results?
"All things being equal, the simplest answer is usually the correct one" - Occam's Razor
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0
User avatar
dickvl
Posts: 54163
Joined: July 18th, 2005, 3:25 am

Re: Renamed executable: "Firefox is already running"

Post by dickvl »

vanemaribel
Guest

Re: Renamed executable: "Firefox is already running"

Post by vanemaribel »

sorry, I didn't know that. I'll take a time to read them though.
Post Reply