Closed Bug 270573 Opened 20 years ago Closed 19 years ago

-remote "openURL(http://some.url/, new-tab)" not working from pine even with custom shellscript

Categories

(Toolkit :: Startup and Profile System, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: nospam, Assigned: benjamin)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

definitely have a copy of firefox running

4:26am {34} pcp01723902pcs:/home/webdragon>$ firefox -remote
"openURL('http://www.apple.com/', new-tab)" || ps aux | grep firefox          
Error: No running window found
webdrag   8149  0.0  0.1  3196  988 ?        S    02:26   0:00 /bin/sh
/usr/bin/firefox
webdrag   8168  0.0  0.1  3868  992 ?        S    02:26   0:00 /bin/sh
/usr/lib/firefox/run-mozilla.sh /usr/lib/firefox/firefox-bin
webdrag   8173  6.1  8.3 107432 43256 ?      S    02:26   7:53
/usr/lib/firefox/firefox-bin
webdrag   9503  0.0  0.0  2536  480 pts/6    R    04:34   0:00 grep firefox


Reproducible: Always
Steps to Reproduce:
1. fire up an xterm, launch the 'screen' util, and run a pine session 
2. at some point later in time, launch firefox from the window manager (in this
case blackbox 0.65.0, and firefox was launched from the popup menu)
3. at some point even later in time, I received an e-mail in pine, and went to
view a contained url via the normal app used (/usr/bin/htmlview) 

Actual Results:  
brings up the 'user selection' dialog instead of launching the url in a new-tab
or new-window. 

Expected Results:  
checked to see whether firefox was already running, and sent the url via the
-remote switch (which info is strangely missing from firefox's help system on
linux!)

I created a custom shellscript in bin/ffremote

#!/bin/bash
firefox -remote "openURL($@, new-tab)" || firefox $@

and changed the 'helper App' in pine to be bin/ffremote

no good, still got the 'user selection' dialog. There is only one user in there,
"default".

As you can see from the description section above, I even tried doing it from
the command line, and had no luck there either, although firefox is demonstrably
running on the current system, and I am infact using it at this moment to enter
this bug. :|
Assignee: firefox → bsmedberg
Component: General → Startup and Profile System
QA Contact: firefox.general → bsmedberg
you need to additionally specify -a firefox so that remote knows what app to
look for an instance of.
I'm not sure I understand what you mean. 

firefox -remote "openURL(http://blah/, new-tab)"

I'm asking FIREFOX to do this, right? so where's this -a firefox suggestion
coming from?

I mean, the instructions here, are pretty clear
http://www.mozilla.org/unix/remote.html (but I had to search for them as they
were not included with the built-in firefox docs. Serious oversight!)
the docs on remote are out of date, and go back to single-process mozilla.  so
the syntax you're using doesn't account for multiple potential Mozilla-based
apps.  Think Thunderbird/Firefox/Mozilla/Sunbind etc etc.  -a makes it explicit
as to which app.  And yeah, there's a bug on making ./firefox -remote imply "-a
firefox" but that's not in place right now.

Since we have a fairly decent startup script that does this automagically and
prefs that control new window/tab etc, there really isn't a point in including
"roll your own script" docs.  There really isn't even a reason for you to set up
your own commandline bits, since ./firefox works fine these days.
You're overlooking the fact that I wouldn't have even tried rolling my own
script if, as you say, it handled it automagically, and IF in fact 

it. just. plain. _worked_.

All I want is for any running process to be able to hand off a URL to firefox,
whether it's running or not, and if it is, open the url in a new-tab always, so
that whatever I'm looking at doesn't go away. 

By the way, in the instances where it didn't work on it's own already, neither
did the shellscript (or anything else). In both cases it behaved as if firefox
isn't already running during the current session. Not when handed off to
/usr/bin/htmlview by the windowmanager, not when handed off to a shell script,
and not from the commandline.

On this linux box I literally *never* want to see the user-selection box again.
That's the problem I'm having and that's what I'm reporting. The only thing in
there is whatever it created at first-run as 'default'. This quite obviously
isn't a single-user system, everyone has their own account, their own firefox
prefs, and there's utterly no need for more than one user-account per-session. 

make it stop make it stoooppppppp! :)
works for me

does -a firefox solve the problem?
it doesn't happen all the time so I have no way of knowing at the moment. 

At the present time the existing default launch from pine opened the url in the
currently running firefox so I could reply here. 

I never seem to know when it's NOT going to work, but when it doesn't it's as if
it refuses to acknowledge what it KNOWS to be an existing firefox, and tries to
start up another one with a user account dialog. I've tried saying "use the
default account that's already running", but it refuses to. 
Recent xremote changes make this WORKSFORME
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
Benjamin, it 'worksforme' too, most of the time, except when it doesn't. Can you
provide a little more detail on what xremote changes occurred that fixed the
problem for you permanently? 
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.