<<< Date Index >>>     <<< Thread Index >>>

Re: New Tab in Mozilla



On Fri, Nov 07, 2003 at 07:51:28PM +0100, Andre Berger wrote:

> Just for the record, I was probably me who wrote the mozilla.sh
> script. Happy to hear you find it useful! 

Just for historical reference, here's my version [1]:

$ cat ~/bin/moz
#!/bin/sh

#barely modified from <URL:http://vroop.com/archives/000020.html>:

#open URL in new process if there isn't one,
#otherwise open URL in a new tab

DISPLAY=:0 /usr/local/mozilla/1.1/mozilla -remote "ping()" &&
DISPLAY=:0 /usr/local/mozilla/1.1/mozilla -remote "openURL($@, new-tab)" &&
exit 0

#if we're here, open a new process.
DISPLAY=:0 /usr/local/mozilla/1.1/mozilla "$@" &


I don't know which came first, but whatever. . .

 - Dave

BTW - The explicit setting of the DISPLAY variable is necessary because
I don't run anything but Mozilla from within X, and so I don't bother to
set $DISPLAY manually every time I fire up a new screen.  I suppose the
problem could be solved by setting $DISPLAY in my .bashrc, but (a) I'm too
lazy; and (b) I often call bash as /bin/sh, or use the tcsh, so I don't
like to rely on my .bashrc to set up anything that all shells will need.

[1]
http://www.bigfatdave.com/dave/bin/moz

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgprm3BeJkYPe.pgp
Description: PGP signature