Closed Bug 307379 Opened 19 years ago Closed 16 years ago

-remote ping() and openURL() do not work as expected

Categories

(Core Graveyard :: X-remote, defect)

1.7 Branch
x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: stella, Assigned: blizzard)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050725 Firefox/1.0.4 (Ubuntu package 1.0.6)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050725 Firefox/1.0.4 (Ubuntu package 1.0.6)

When I have the firefox application running and try the following from my
command prompt:
 firefox -remote "openURL(http://www.google.com)"
it always opens the URL in a new window despite the fact that I have one running.

When I try:
 firefox -remote "openURL(http://www.google.com, new-tab)"
it gives the following error:
  Error: Failed to send command: 500 command not parsable:  
openURL(http://www.google.com,

When I do :
 firefox --verbose
it displays the following msgs:
 FIREFOX_DSP=esddsp
 APPLICATION_ID=firefox
 CMDLINE_DISPLAY=
 DISPLAY=:0.0
 REMOTE=0
 TRY_USE_EXIST=0
 OPTIONS=
 DEBUG=0
 DEBUGGER=
 Running: /usr/lib/mozilla-firefox/firefox-bin -a firefox -remote 'ping()'
 PING_STATUS=0
 Running: /usr/lib/mozilla-firefox/firefox-bin -a firefox -remote 
xfeDoCommand(openBrowser)

As you can see the result from ping() is 0.  It's always 0 despite the fact that
I have a few firefox windows open.



Reproducible: Always

Steps to Reproduce:
1.launch the firefox application
2.attempt to open a URL using the command: firefox -remote
"openURL(http://www.google.com)"


Actual Results:  
The URL specified is opened in a new browser window.

Expected Results:  
The URL should have been opened in the existing browser window launched in step 1.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20050907 Firefox/1.6a1
ID:2005090711

This WFM. What do you have "Open links from external applications" set to in
your preferences? It will respect this setting when opening the URL.
I've updated my preference settings so that it will open the URL in the most
recent tab/window and that works.  Thanks!  I didn't see any references in the
help documents to this preferences setting but in future I'll check all the
firefox options.  It might be an idea to add it to the help doc - just in case
someone else doesn't realise it either.

However I'm still encountering the issue where ping() returns 0 when it
shouldn't and where I get the following error when I try "firefox -remote
'openURL(http://www.doolin.com, new-tab)'"

Error: Failed to send command: 500 command not parsable:
openURL(http://www.google.com,

I could understand if the URL was opened in the existing tab/window - since
that's what my preferences now stipulate and also since there's no option to
instruct firefox to open the URL where the client requests (i.e. new-tab or
new-window).  However, this error appears to be a parse error and causes the URL
not to be opened anywhere.

Stella
Have you tested this using a mozilla.org build rather than an Ubuntu packaged build?
Assignee: nobody → blizzard
Component: General → X-remote
Product: Firefox → Core
QA Contact: general → blizzard
Version: unspecified → 1.7 Branch
Dupe of bug 227658?
(In reply to comment #3)
> Have you tested this using a mozilla.org build rather than an Ubuntu packaged
build?
No, I haven't.  I have a SUSE linux 8.0 box and RH 9.0 one - I could try a
mozilla.org build on one of those if you'd like.

(In reply to comment #4)
> Dupe of bug 227658?
It seems similar, except they say that "new-window" works, which it doesn't for
me.  I just the same error as if I had tried "new-tab"

Stella
Firefox 1.0.4 is obsolete now.

WFM, tested with the following, and also ping() on a non-running Tb2

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008061201 SeaMonkey/2.0a1pre

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.15pre) Gecko/20080612 BonEcho/2.0.0.15pre
 - Build ID: 2008061203

seamonkey -remote "ping()"
-- (seamonkey running) no message, return status 0

thunderbird -remote "ping()"
-- (thunderbird 2.0.0.15pre, latest nightly, not running): "Error: No running window found", return status 2

firefox -remote "ping()"
-- (firefox, running): no message, return status 0

seamonkey -remote "openURL(about:, new-tab)"
-- SeaMonkey opens a new tab on the about: page, in the existing window

seamonkey -remote "openbURL(about:, new-window)"
-- a new SeaMonkey window opens, displaying the about: page

firefox -remote "openURL(about:, new-tab)"
-- BonEcho opens a new tab on its about: page

firefox -remote "openURL(about:, new-window)"
-- BonEcho opens new window on its about: page

Note: the quotes (as shown above) are required for my bash shell.

If anyone wants to REOPEN, please specify what you did, with which version of which program, how it reacted, and how you had expected it to react.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.