Closed Bug 393645 Opened 17 years ago Closed 11 years ago

-new-tab command line parameter doesn't behave correctly or consistently in MacOSX.

Categories

(Toolkit :: Startup and Profile System, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: hellyeah, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

In the Windows and Linux version of firefox if I specify: 

firefox -new-tab http://www.mozilla.org

and the firefox is already running, it opens up a new tab in the currently running firefox instance. 

I expect the same behavior to work in MacOSX. 


Reproducible: Always

Steps to Reproduce:
1.Launch Firefox in MacOSX
2.Open a Terminal and cd into the Firefox.app/Contents/MacOS folder. 
3.Type './firefox-bin -new-tab http://www.mozilla.org'
Actual Results:  
A window opens up claiming "Close Firefox\n A copy of Firefox is already open. Only one copy of Firefox can be open at a time."

Expected Results:  
A new tab with the url I passed in as a parameter to -new-tab should be displayed in the currently running FireFox instance. 

A new tab with the url I passed in as a parameter to -new-tab should be displayed in the currently running FireFox instance.
I can confirm this. This is a major issue for me. I am developing an add-on (aka extension) for FireFox. My add-on processes the command line args. I want to be able to invoke the add-on whether or not a previous instance of FF is running or not.

Can anyone suggest an alternate mechanism or workaround.
I run Firefox 2.0.0.13 on Linux. Maybe I am making an incorrect assumption but I would have thought that the Linux and MacOSX versions of Firefox behave in the same way.

If this is the case upgrading to 2.0.0.13 would solve your problem: on Linux,
firefox -new-tab <url>
launches the URL in the firefox process that was started first (if you have multiple Firefox processes running).
This bug is also reproducible always in 3.03 on OS X 10.5. Full version:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3

I would also appreciate a workaround if anyone knows one.
This bug is also reproducible always in Firefox 3.6 on MacOSX 10.6.2. Works perfect on Windows or Linux:

> firefox -new-tab http://www.mozilla.com

Anyone forgot to add this parameter for MacOSX?
This still is not solved. I am using Firefox 3.6.3 under Mac OS X 10.5.8.
I expect Firefox to display the requested URL in the current instance (if there is one) or in a new one (if there was none), such as it does under Linux and Windows.
Using Mac's open(1) is not useful to me, it does not get along well with TabMixPlus.
I submitted a patch for this problem: https://bugzilla.mozilla.org/show_bug.cgi?id=427206.

I have been patching every Firefox version for myself since and it works fine.
Blocks: 363747
Status: UNCONFIRMED → NEW
Component: General → Widget: Cocoa
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → cocoa
Hardware: PowerPC → All
Component: Widget: Cocoa → Startup and Profile System
Depends on: 427206
Product: Core → Toolkit
QA Contact: cocoa → startup
This can't be a regression from (and thereby block) bug 363747, since this bug was filed against Firefox 2:

(In reply to comment #0)
> User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6)
> Gecko/20070725 Firefox/2.0.0.6

Bug 363747 landed for Firefox 3.6.
No longer blocks: 363747
This also keeps Thunderbird OSX users from using the "-compose" argument and also keeps the Thunderbird extension Thunderlink from working on OSX (it uses a -thunderlink argument that works fine on Linux and Windows).
This bug is still actual. Very annoying. Could someone fix that :-) ?
Mac does not use a command-line remoting mechanism. Talking to an existing instance of Firefox is handled through apple events. This will not be fixed.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
And how do we do that?
Maybe a solution with this AppleScript: http://git.mnt.io/?p=Dotfiles.git;a=blob;f=scripts/FirefoxNewWindow;hb=HEAD (change `keystroke "n"…` to `keystroke "t"…` for new tab).
And here is how to execute this script: http://git.mnt.io/?p=Dotfiles.git;a=blob;f=function;hb=HEAD.

Hope it helps.
I didn't found any documentation on MDN about that. Is it planned?
You need to log in before you can comment on or make changes to this bug.