You are here

Separate instances of port firefox

16 posts / 0 new
Last post
jsimlo
Offline
Last seen: 16 years 4 months ago
Joined: 2006-07-02 06:29
Separate instances of port firefox

Hi,

is there a possibility to add some support to run portable firefox in several instances. Right now, the portable firefox searches for running instances and if there is one, it only opens a new window of the running application.

But, if the firefox crashes (and it does from time to time, do not argue :)), all the windows are gone, all the work. I used to open several instances of iexplorer to prevent such damage. One instance for work, one for occasional fun, etc.

So, is there a possibility to open multiple independent processes of the firefox with the same settings? I do not care about the history, cache, cookies. But I do care about the extensions and bookmarks.

Thanks for any kind of reply,
jsimlo

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 5 months ago
Developer
Joined: 2005-12-10 15:22
Read the Readme

and it will tell you what to do. Also please search the forums before posting.

Yours

Steve Lamerton

jsimlo
Offline
Last seen: 16 years 4 months ago
Joined: 2006-07-02 06:29
Yes, I did. Many times..

But the AllowMultipleInstances=true INI setting is not what I was asking about. I do not want to run multiple different Firefoxes or different profiles simultaneously. I want to run one and only profile and run it multiple times. Exactly as the iexplorer is doing, when you run a new window from a desktop shortcut.

The AllowMultipleInstances entry will allow Portable Firefox to run alongside your regular local copy of Firefox if you set it to true (lowercase). But I do not have any "regular local copy of Firefox". There is only the Portable Firefox and only one profile.

Kind regards,
jsimlo

Deuce
Offline
Last seen: 13 years 5 months ago
Developer
Joined: 2005-12-24 16:32
No, the....

AllowMultipleInstances=true means that you can run multiple instances of portael firefox on the same machine. If this settings is not checked, trying to run protable firefox.exe twice will result in a multiple instance message. If the settings is set, it will open a new instance of portable firefox. The reason this settings was put in the ini, was originally for theose that had a regular version of firefox, but it works for both situations.

***********************************
Deuce {The Core}{Dev Blog}
Portable Software: Just the beginning.

Deuce
Portable Software: Just the beginning.

jsimlo
Offline
Last seen: 16 years 4 months ago
Joined: 2006-07-02 06:29
No no no, two instances mean

No no no, two instances mean two processes. Not just two windows of one process.

jsimlo

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 14 years 4 months ago
Joined: 2006-01-06 21:27
Actually

I think FF latches onto the current process, and I am thinking (sic) that IE would too.
----
R McCue
PortaBlog Home and My Website
PortaBlog is now officially out of beta!

"If you're not part of the solution, you're part of the precipitate."

Bruce Pascoe
Offline
Last seen: 12 years 1 month ago
Joined: 2006-01-15 16:14
...

Neither does. If you open two instances of IE (in XP, at least), you'll see two listings for IEXPLORE.EXE in Task Manager. That's so that if IE crashes, you don't lose all your open windows. If AllowMultipleInstances=true, the same goes for Firefox. The only way Firefox will latch onto the currently-running process is if AllowMultipleInstances is set to false.

I suppose that's one downside of tabs: even if you could have each window open in its own process, if one window's process crashed, you'd lose all the tabs in that window. Thankfully, Firefox is pretty stable.

-
fatcerberus@yahoo.com  [aim: fatcerberus]
I have no witty remarks or quotes to share at the moment.

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 14 years 4 months ago
Joined: 2006-01-06 21:27
Damn!

Normal FF does though. I watched it just before.
Anyway, I'm gonna shut up now. I always seem to get stuff wrong.
----
R McCue
PortaBlog Home and My Website
PortaBlog is now officially out of beta!

"If you're not part of the solution, you're part of the precipitate."

Bruce Pascoe
Offline
Last seen: 12 years 1 month ago
Joined: 2006-01-15 16:14
...

Yeah, AllowMultipleInstances in PFF is a bit of a hack. Normal Firefox will just latch onto the current process, since it's not programmed so that two instances can share a profile (you'd need, at the very least, a mutex to pull it off). AllowMultipleInstances just sets an environment variable telling Firefox "don't check for a previous instance."

-
fatcerberus@yahoo.com  [aim: fatcerberus]
I have no witty remarks or quotes to share at the moment.

Bruce Pascoe
Offline
Last seen: 12 years 1 month ago
Joined: 2006-01-15 16:14
...

AllowMultipleInstances=true is the setting you're looking for, but if you're just using one profile, isn't it easier just to do File -> New Window? There's even a button you could add to the toolbar to open a new window. Opening multiple instances with a single profile is impossible.

Two instances of Firefox can't both use the same profile at the same time, as two programs can't safely share write access to a file or set of files. However, a single instance with two or more windows can.

-
fatcerberus@yahoo.com  [aim: fatcerberus]
I have no witty remarks or quotes to share at the moment.

jsimlo
Offline
Last seen: 16 years 4 months ago
Joined: 2006-07-02 06:29
unfortunatelly

This is, what I was mostly afraid of: that there is no way to do that.

I have already set the AllowMultipleInstances to true. A long time ago. But it does not solve anything for me.

A New Window means the same process, actually the same message thread. When one window crashes, all windows are going down as well. When one window stops responding, all windows stop respondig.

I see that this is a one big disadvantage of the Firefox against the IExplorer I used before. When you cannot have multiple and independent browsing processes, you may easilly loose all your work just becouse of one stupid site you accidentaly clicked on. Also, you just cannot login into the Yahoo! Mail or any PhpMyAdmin twice, as two different users at the same time. Am I correct? And more importantly, is it worthwhile to request such support directly from Mozilla?

Anyway, thank you for your reply.
jsimlo

Bruce Pascoe
Offline
Last seen: 12 years 1 month ago
Joined: 2006-01-15 16:14
...

That's impossible (or at least, close to it). How can you expect two processes to share access to the same profile? Firefox is constantly writing to the profile directory. That's what the file parent.lock is for. It tells Firefox "another copy is already using this profile--I can't touch it."

I don't know how Internet Explorer pulls it off (multiple instances sharing the same settings), but being a programmer, I can tell you this much: it's not simple to implement.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 34 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Individual Files

IE uses individual files for bookmarks (.URL files), cookies (.txt files) and cache. So, rather than using and maintaining a single monolithic cookies.txt or bookmarks.html, it's just modifying individual small files as needed and then closing them. I think that makes multiple processes a lot easier for IE than, say, Firefox, Opera, Mozilla Suite, etc.

Sometimes, the impossible can become possible, if you're awesome!

jsimlo
Offline
Last seen: 16 years 4 months ago
Joined: 2006-07-02 06:29
Oh, c'mon.. I am a

Oh, c'mon.. I am a programmer too.. ;)) It is not that "very" hard to do that.

Actually, there is a whole story to be studied about: semaphores, mutexes, rendezvous, etc. And I have used them well even in a small app like TED Notepad. Considering the size of Firefox... :))

Btw: AFAIK, IExplorer uses a special daemon to manage cache. Thus, even when there is just one big index.dat file for the entire cache index, the daemon handles it well. All IE windows connect to that daemon to do the caching.

The bookmarks and cookies are stored in small files independently to prevent interprocess damage with no need for mutexes.

Kind regards,
jsimlo

Bruce Pascoe
Offline
Last seen: 12 years 1 month ago
Joined: 2006-01-15 16:14
...

Yeah, but Firefox stores everything in big, monolithic files, and we don't want it relying on a daemon that probably has to be registered in the registry, otherwise we won't be able to make it portable anymore!

Also, I know very well about mutexes, semaphores, and the like, but if any application uses them excessively, it will slow the app down quite a bit, since most of the program's time will be spent waiting on mutexes. Especially considering that Firefox writes to its monolithic files CONSTANTLY.

-
fatcerberus@yahoo.com  [aim: fatcerberus]
I have no witty remarks or quotes to share at the moment.

jsimlo
Offline
Last seen: 16 years 4 months ago
Joined: 2006-07-02 06:29
I disagree quite a lot about

I disagree quite a lot about "excessive usage of mutexes or even semaphores". It is true, that a poorly written app could just slow down, waiting on itself. But! Firefox is not that poorly written one.. Smile

Now, I think it is not for us to argue about it. I shall request it directly at Mozilla. Lets see, what happens next.. Wink

Kind regards,
jsimlo

Topic locked