[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

separate firefox processes (was Re: segmentation fault with firefox 1.5 after apt-get upgrade yesterday)

(this ran long-winded, so here's a quick executive summary, read on
for details)

SUMMARY: I want to run a second firefox process in my 32bit chroot,
without it just sending a remote command to open a new window from my
64-bit firefox. This was possible with script-fu until recently, but
now I can't figure out how to make firefox-bin ignore another firefox
on the same X display.

Jack Malmostoso <jackmalmostoso@freesurf.ch> writes:

> On Sun, 15 Jan 2006 22:40:07 +0100, Christoph Fassbach wrote:
> > So never try to use a remote firefox with little endian sitting in front
> > of a
> > big endian machine and vice versa. Their communication will fail and mess
> > the local one up.
> Am I the only one who thinks this is very very wrong? I mean, I am sitting
> in front of my iBook and I am connecting to another linux machine, why in
> the world should I care what architecture is the server running?
> I hope this has been pointed out somewhere in the firefox development.
> Thanks for the advice anyway!

Well, not only do I agree that it's wrong, and it's driven me nuts
before, but I have a related issue now.

On my amd64 laptop, I've been using firefox for around a year. I
generally run the native 64 bit version, which, of course, doesn't
support flash reasonably. Most of the time, I consider that a feature
(less annoying animated ads), but occasionally I want to see a flash
movie or something (angryalien.com comes to mind...). I also tend to
have a lot of "state" in my firefox-- open tabs and occasionally
windows, and separate histories in each tab, etc, so I *really* don't
like shutting down my "main" firefox. And I like the speed of the
64bit native version, and I try to avoid the chroot as much as I can.

I had a solution that worked well (mostly) until the latest version of

I copied the /usr/bin/firefox script to firefox-noremote, and edited
it so that the ping test always thought there was no other firefox
running. Then I made an alias that ran firefox-noremote in the 32bit
chroot with "-P secondary" so it didn't complain about the fact that
the profile was already open. This happily brought up a new firefox
window that was less flash-crippled, and I could just select and paste
the url I wanted from my regular firefox into the flash-enabled one,
which was only a minor pain.

Now (1.5.dfsg-4), the script/ping() operation no longer seems to
apply-- it appears that the "test for a running firefox" functionality
is in the firefox.bin itself, and I can't figure out a way to disable it.

It seems like this scenario, although apparently the firefox
developers have the attiude "why would anyone want to do that," isn't
so unreasonable... I assume they're thinking "we'll protect naive
users from starting up multiple copies of a big memory footprint
process" and "we don't want two firefoxes arguing over bookmarks and
stuff," but I think they discount valid reasons one might want 2
firefoxes running on a single X display. I suppose it also might be
"we want windows-like behavior under X so people don't get confused
by seeing platform-dependent behavior."

Some other reasons it would be nice to do this:

* the big endian / little endian problem mentioned above (it's also
annoying running on multiple architectures when your home directory is
cross-mounted via NFS or AFS so all the "local junk" it puts in your
.firefox might be shared by multiple logins)
* if you have an ssh connection to a machine with X forwarding, and
you want to access a web page that is only allowed access from the IP
number of the remote host, you want to run on the remote host and
display on the local host-- it's stupid that you have to shut down
your local firefox before you can do this.

I could just always run 32bit firefox, but that seems icky... (I also
find that the scripts to make it easy to run in the chroot have
problems with shell expansions and spaces in filenames and stuff, so I
avoid them).

I'd really appreciate any better suggestions... particularly if
someone were to tell me there's an undocumented (or unnoticed by me)
flag like -noremote or something. What I'd really like is to be able
to say "firefox --read-only-profile --no-remote" so I could still get
my bookmarks and whatnot from my profile while avoiding whatever it is
they worry about regarding two firefoxen opening the same
profile. Essentially, I'm happy to have a secondary firefox process be
mildly crippled if I can just start it without quitting my main, big

And yeah, I know I should consider talking to the firefox folks
directly, but I figure in AMD64-land, it's enough of a real issue that
it's likely someone has figured it out already, plus most of you will
probably have sympathy for my attitude while I expect the firefox
developers will say "you're some fringe amd dual-binary multiarch
wacko, this is the behavior all normal people want, so quit whining."

And yeah, I know I could read the source to look for other options,
but I wanted to see if someone else had already figured out a good
solution. If I do figure a better way, I'll post it here for
posterity, though.

				- M
Mark "Monty" Montague | monty@gg.caltech.edu  | I don't do Windows(tm)
If a tree falls when there's no one observing, does its wave function collapse?
 X-GNUPG-Fingerprint: E1E3 E513 3687 94E3 5C61  C97B CBC7 2CA6 01B1 F0A7

Reply to: