Cannot open firefox from link if it is already running

Bob Snyder bob.snyder at cox.net
Fri Sep 3 17:43:52 CEST 2004


Marc Schwartz wrote:

>On Thu, 2004-09-02 at 22:45, Bob Snyder wrote:
>  
>
>>Marc Schwartz wrote:
>>    
>>
>
>  
>
>>snip
>>    
>>
>
>  
>
>>>Here is one:
>>>
>>>#!/bin/sh 
>>>
>>>/usr/include/firefox/firefox -a firefox -remote 'ping()' 
>>>if [ $? -eq 0 ]; then 
>>>#open a new window 
>>>/usr/include/firefox/firefox -a firefox -remote "openurl($1,new-window)"
>>>else 
>>>#open new instance 
>>>/usr/include/firefox/firefox $1 &
>>>fi
>>>
>>>
>>>The above had to be changed (lines 1 and 4) in the recent version of
>>>Firefox, so be aware of that. The change entails the '-a firefox' part.
>>>
>>>I use the above in a shell script that I put in ~/bin and then set any
>>>HTML related application preferences (including htmlview) and the 'run
>>>action' for ROX to that script.
>>>
>>>If you would prefer to open a new 'tab' instead of a new window, change
>>>'new-window' in the above to 'new-tab'.
>>>
>>>HTH,
>>>
>>>Marc Schwartz
>>> 
>>>
>>>      
>>>
>>I tried this script and it almost worked! First I had to change the path 
>>to firefox (I'm curious why you have it installed in /usr/include).
>>    
>>
>
>Because I'm an idiot.  :-)
>
>It should be /usr/lib/firefox...
>
>  
>
>>When I click a link, the window (or tab) opens, and the page appears 
>>normally, but all the links in the page are broken. The URL that is 
>>opened is a temp file on the local machine rather than the actual URL 
>>(I'm running ff 0.9.3). What am I doing wrong?
>>    
>>
>
>Not sure about the problem with the links. I don't have that here.
>
>How did you install Firefox and what distro?
>
>I am running FC2. I initially used an RPM from one of the FC
>repositories, but I found that the packager had played around with the
>Firefox start up script and that caused some problems.
>
>So I uninstalled the RPM and used the Firefox Linux/XFT installation
>tarball. I installed that as root and it works much better.
>
>Not sure if that helps you or not.
>
>Marc
>

My distro is an older Slackware that I've upgraded manually to the 
latest of most everything. gcc, glibc, gtk+2.4, etc. Firefox was 
installed with the new installer.

When I click on a link in an email, for example, firefox opens a new 
tab, but the URL displayed is like this: file:///tmp/0qgcwitz-1.html. 
Firefox has copied the whole page to my /tmp, and opened it from there. 
Obviously the relative links don't work, but the absolute links do.

Does anyone else observe this behavior?

Sorry, this has gotten kind of off-topic.

Bob S.






More information about the Xfce mailing list