[TAG] 2c Tip: Launching Firefox 0.9
ben at callahans.org
Mon Jun 21 11:05:39 MSD 2004
On Mon, Jun 21, 2004 at 10:28:47AM +0530, Raj Shekhar wrote:
> I had used the following script for launching Firefox (earlier named
> firebird) (See my article Mozilla Firebird - A review
> (http://linuxgazette.net/issue97/shekhar.html) to see how you can use this).
> /usr/lib/mozilla-firebird/MozillaFirebird -remote "openURL($@, new-tab)" ||
> exec /usr/lib/mozilla-firebird/MozillaFirebird "$@";
> However, with the 0.9 release (the latest one, which is even more slick
> and fast), this stopped working. Instead of launching the new tab, the
> Profile Manager UI pops up. This was reported as bug
> http://bugzilla.mozilla.org/show_bug.cgi?id=246168 in the Mozilla Bugzilla.
> The reason for this is the change in the format of calling the remote
> command. The new way of doing this is the
> firefox -a firefox -remote openURL(<url>,new-tab)
> Note that there should be no space between the the comma and the command
> after the url (new-tab in this case, you can also use new-window to
> start a new window) or you get a "Error: Failed to send command: 509
> internal error".
> So the script to launch firefox becomes
> #!/bin/sh -x
> /usr/lib/firefox/firefox -a firefox -remote "openURL("$@",new-tab)" ||
> exec /usr/lib/firefox/firefox "$@";
I just had the same problem with the new Mozilla upgrade; the trouble is
in the brain-dead URL parser at the end of the wrapper script. Although
I fixed it, it very quickly became useless: I downloaded Mozilla 1.7
from http://mozilla.org, and its wrapper script works fine.
Oh, and since you brought this issue up: just yesterday, I was reading
about Mozilla's "remote" methods in order to fix the above problem - and
still forgot, completely, that there's a "native" way to test if Mozilla
is running or not.
Wonder if I can trade this brain in for a newer model?
mozilla -remote "ping()" 2>/dev/null &&
mozilla -remote "openurl($1,new-window)" ||
* Ben Okopnik * okopnik.freeshell.org * Editor-in-Chief, Linux Gazette *
-*- See the Linux Gazette in its new home: <http://linuxgazette.net> -*-
More information about the TAG