Links in new page/tab using Mozilla > 1.1, any UNIX (trivial shell script)
So, it's trivial allright, but maybe someone didn't think of it so
far/is a UNIX newbie/is a Mozilla newbie:
How to use Unix-Mozilla efficiently as "web browser path" in 3.0.5,
using the features outlined in
http://www.mozilla.org/unix/remote.html:
-
#!/bin/bash
touch
MOZILLA_PATH=/usr/bin
don't touch
MODE="$1"
case "$MODE" in
new-tab|new-window)
shift
URL="$*"
OPENURL_CMD="openurl($URL, $MODE)"
;;
*)
OPENURL_CMD="openurl(http://www.mozilla.org/unix/remote.html,
new-window)"
;;
"$MOZILLA_PATH"/mozilla -remote "$OPENURL_CMD"
-
So, just enter "/location/of/scriptfile (new-tab|new-window)" in the
"web browser path" field in config and you're set.
God bless modern browsers! ;)
This will work with any Application that passes the URL at the end of
the command line.
So, basically, this is a feature request, too, since with a
URL-Placeholder for that field even that trivial script would be
obsolete. :)
HTH/HAND, Bernd
请先登录再写评论。
On Wed, 14 Jan 2004 18:40:46 +0100, Bernd Haug wrote:
Remote only works if Mozilla is already running doesn't it? So added a
check if the process is running, if not - run a new one would be good ( at
least I know this USED to be a problem ).