LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Firefox -remote option generates "No running window found" error (http://www.linuxquestions.org/questions/linux-software-2/firefox-remote-option-generates-no-running-window-found-error-211414/)

lasindi 07-30-2004 05:45 AM

Firefox -remote option generates "No running window found" error
 
After having been frustrated by not being able to double click on an HTML file in Konqueror and open it in a new Firefox window when Firefox was already running, I googled for a solution and found this . I changed the Firefox directory and everything necessary for the script to choose the correct command to execute. However, it now produces this error:

Error: No running window found

I know that the problem isn't with the script, because when I try executing

/usr/local/firefox/firefox -remote "openUrl('google.com', new-tab)"

(the command that the script should and does execute) I get the same error. Why does this error happen when I have an open Firefox window? Thanks.

lasindi

guest 08-05-2004 01:48 AM

Yep I noticed this too.. I found your post here doing a search for the same problem.. I've discovered that the older -remote command doesn't work anymore ( busted? ). However this seems to work instead...

firefox -a firefox -remote "openurl(www.google.com,new-tab)"

Go figure...

Cheers
Griffon (MCB) Hinterlands

PS. Here is a shell script that works with later versions of firefox under FC2
put it in /usr/bin

Code:

#!/bin/sh
 
# firefox
# A script to make firefox do what its supposed to do by default and doesn't
#
 
FOX_HOME=/usr/share/firefox
 
#Is firefox running?
$FOX_HOME/firefox -a firefox -remote 'ping()'
 
if [ $? -eq 0 ]; then  # Yep.. Open a new tab / window
 
#$FOX_HOME/firefox -a firefox -remote "openurl($1,new-window)"&
$FOX_HOME/firefox -a firefox -remote "openurl($1,new-tab)"&
 
else # Nope.. Open new firefox
 
$FOX_HOME/firefox $1 &
 
fi


lasindi 08-05-2004 02:45 AM

Cool, works great! :D I'm just curious as to how you found this out. I did what I felt was a pretty thorough search of the Internet and couldn't find anything. It just seemed no one had this problem, and after a few days, I thought no one would answer my post. Thanks!

lasindi

guest 08-06-2004 12:10 AM

Well a little bit of looking around came up trumps.. though http://www.mozilla.org/unix/remote.html did help me get the command right.

The firefox command is actually a shell script come about from the early days of mozilla and it actually calls a command called mozilla-xremote-client after doing a bunch of arguably pointless stuff do to with profiles. So I just passed these arguments to this script based on the the usage for mozilla-xremote-client. Not much to it really..

Griffon (MCB) Hinterlands

rhoekstra 09-17-2004 06:52 AM

Cool..
 
Cool.. this helped me as well for the kNewsticker to open news items in my current firefox session, on a new tab...
But I have a bugger, called 'launch feedback' that keeps bouncing for 30 seconds while the page is showing in the browser..:confused:

How to replicate:
Set the File associations to open the above script for the type 'text/html' (parameter %u for url).
on the 'Embedded' tab of the association, select 'Open in new Window'.

- From kNewsTicker, just klick a link.
- From konqueror, find a locally stored html file and doubleclick it. It will open a new Firefox instance/tab, but the launch feedback will remain (provided you have this option enabled).

How can I tell the feedback agent it can stop ? It must be something other than the script ending with a return value of 0.

Any help would be appreciated.

FYI, I'm using FC2 with Firefox 1.0PR. Not that it really matters, but hey.. you never know ;).

rhoekstra 09-22-2004 05:41 AM

Nobody? :confused:

lasindi 09-23-2004 10:25 PM

I'm not sure how to tell it to stop in the middle, but you can set preferences to turn it off completely or shorten how long it bounces (or whatever it does in your case). Go to KDE's Control Center and go to "Appearance & Themes" and then "Launch Feedback." You can mess with settings in there, if you want.

lasindi


All times are GMT -5. The time now is 08:11 AM.