#!/bin/sh # # Open an URL in a running Firefox or start a new one. # # Copyright (C) 2005-2007 Lars Engels # Use and distribute under BSD license. # if [ -z "$1" ]; then echo "Usage: `basename $0` " exit 1 fi URL=$1 firefox=`which firefox` || firefox=`which linux-firefox` $firefox -remote "ping()" 2> /dev/null if [ $? -eq "0" ] ; then $firefox -remote "openURL($URL,new-tab)" & else $firefox "$URL" & fi