To open default profile fails after an alternative profile ("-P profileName -no-remote") is running.

Bug #39559 reported by Dave Gilbert
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Confirmed
Low
Mozilla Bugs

Bug Description

(This used to work on breezy, but doesn't seem to work on the firefox version on dapper)
I have two firefox profiles; the 'default' and a specific profile for Pandora
that I run a separate instance of firefox at the same time in each profile (so that
stalls in general web browsing don't stall Pandora).
I have this setup with the buttons on my panel running either

   firefox -P default %u

or

   firefox -height 600 -width 800 -P Pandora

But I'm finding that on current dapper the '-P default' is being ignored and I'm getting the Pandora profile.

If I use -ProfileManager and select Default it works fine.

Tags: mt-upstream
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

cannot reproduce it here. It works fine for me.

Do you have the problem simply by launching "firefox -P default" in a terminal ?

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Hmm OK, it seems a bit more complex;

if I have nothing running then
  I can start the default and then start Pandora

if I have the Pandora one open then
  -P default brings up another Pandora profile run
  but using the profile manager still lets me bring up a default.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

ok, I can confirm the following : you cannot have two different profiles open at the same time. I don't know if it is a bug or not, but it is confirmed.

I rename the bug accordingly.

Changed in firefox:
status: Unconfirmed → Confirmed
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote : Re: Cannot have two profiles (-P switch) opened simultaneously.

Thanks.
Given that you can have the two profiles open at the same time as long as you pick it off the ProfileManager rather than using -P it means there isn't any fundamental stuff being shared, and given that it used to work on Breezy, it feels to me to be a bug rather than something missing.

(It is also very useful - in this case it provides separation for performance, but I can also see you could use it for a little more security if you wanted to access some sites through a browser set with stronger security etc and less caching)

Revision history for this message
Ian Jackson (ijackson) wrote : Re: [Bug 39559] dapper version ignoring -P default

Dave Gilbert writes ("[Bug 39559] dapper version ignoring -P default"):
> But I'm finding that on current dapper the '-P default' is being ignored
> and I'm getting the Pandora profile.

Could you please run the command with -x, like this
   bash -x /usr/bin/firefox -P default
and send me the output ?

Thanks,
Ian.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote : typescript of bash -x run

bash -x /usr/bin/firefox -P default

Still brings up wrong profile if:
  1) No default profile is open
  2) The other profile is already open.

Revision history for this message
Ian Jackson (ijackson) wrote : Re: Cannot have two profiles (-P switch) opened simultaneously.

Thanks for that transcript. I see that the firefox script seems to be working properly.

How do you start the Pandora firefox ? To make all of this work properly it is necessary for non-default-profile firefoxes to use a non-default appname too. See the firefox(1) manpage which documents the options to the runner.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Ah thanks - that seems to be what is going on; but I don't quite understand the manpage definitions of this.

I start the pandora firefox with:
    firefox -height 600 -width 800 -P Pandora

and I start the default with:

    firefox -P default %u

Now the manpage says:
" -P profile
              Start with profile. Implies -a firefox--profile, or -a default
              if profile is default.

       -ProfileManager
              Start with profile manager. Implies -a with a fresh unique
              application-id.
"
So my reading of that is that the -P should do the -a for me, however
I find that

firefox -P default -a default

opens the default profile, while without the -a default it does not.
(which seems to be the fix I need).

How do I find the app id of a running app to see what it think it is ?

Revision history for this message
Ian Jackson (ijackson) wrote : Re: [Bug 39559] Re: Cannot have two profiles (-P switch) opened simultaneously.

Dave Gilbert writes ("[Bug 39559] Re: Cannot have two profiles (-P switch) opened simultaneously."):
> How do I find the app id of a running app to see what it think it is ?

I'm afraid I don't know a way to do this, although you can sometimes
infer it because if you know its profile you can bring up new windows
in it with the right -P and -a values.

You're saying that you're running
 firefox -height 600 -width 800 -P Pandora
and
 firefox -P default %u

Assuming that %u expands into something sensible then this ought to
work and those two runes should have separate appids. Where is this
string with %u specified ?

Can you please run them both with
  bash -x /usr/bin/firefox <rest of arguments>
?

Ian.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote : Re: Cannot have two profiles (-P switch) opened simultaneously.

OK, I'll attach the typescript from this in a sec - I'm not quite sure what the %u is supposed to do on Gnome; I've removed it anyway with no change.

I noticed something odd in the firefox man page; it says the default is '-a firefox' (in the doc for -a), but in the doc for -P it says 'Implies -a firefox--profile, or -a default if profile is default.'. This seems inconsistent.

So if I use the pair of

   -P Pandora
and
  -P default

I end up with the wrapper calling it with

  -a firefox--Pandora

and
   -a firefox

and I get the problem.
So what I'm doing that is working is for the default I'm using -P default -a default.

I've got to wonder if there is a string comparison somewhere that is only comparing the start of the string and not distinguishing between 'firefox' and 'firefox--Pandora' ?

Dave

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote : another set of runs with bash -x

bash -x runs of

bash -x firefox -height 600 -width 800 -P Pandora
bash -x firefox -P default

Revision history for this message
Alexander Sack (asac) wrote : Re: Cannot have two profiles (-P switch) opened simultaneously.

upstream solution is to set MOZ_NO_REMOTE=1 in environment. we should find that bug and note it accordingly in this bug.

Changed in firefox:
assignee: nobody → mozillateam
David Farning (dfarning)
Changed in firefox:
assignee: mozillateam → mozilla-bugs
Revision history for this message
Prashant (findprashant) wrote :

I am able to run two profiles simultaneously by using commands

firefox -no-remote -P default
firefox -no-remote -P devprofile

As explained in this blog : http://weblogs.java.net/blog/bino_george/archive/2007/07/firefox_profile_1.html

Revision history for this message
Glyphobet (glyphobet) wrote :

I can confirm that I am also experiencing this bug. Firefox 2.0.0.8 under Ubuntu 7.04 behaved as follows. These two commands would open two different instances of Firefox, using two different profiles:

firefox -P SomeProfile
firefox -P SomeOtherProfile

However, Firefox 2.0.0.8 under Ubuntu 7.10 behaves in the different, confusing (broken?) way as described in this bug; The second command above would only open a new Firefox window using the profile specified by the first command.

I use multiple Firefox profiles every day, so I'm 100% sure that this behavior changed in the upgrade between 7.04 and 7.10. It did not change in a Firefox upgrade.

The -no-remote trick above works.

cablop (cablop)
summary: - Cannot have two profiles (-P switch) opened simultaneously.
+ To open default profile fails after an alternative profile ("-P
+ profileName -no-remote") is running.
Revision history for this message
cablop (cablop) wrote :

The expected behavior is:
1. run
firefox -P alternativeProfile --no-remote
it spawns a firefox with the alternative profile
2. run
firefox
or
firefox -P defaultProfile
it must spawn the default profile and run it as the main one

but in Ubuntu it fails, in windows it worked as expected, but not in Ubuntu. to spawn the main or default by
firefox -P defaultProfile --no-remote
works, but the --no-remote flag makes it not work as expected, because new links from third party applications look for a firefox with not this flag

the -a flag works, but it is not documented, i can't find what does it do, nor the %u flag

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.