#!/bin/sh mozremote() { mozilla -remote "openURL($1,new-window)" } if xlsclients|egrep -q "^[^ ]+ +(|.*/)mozilla-bin( |$)"; then MOZILLA=mozremote else MOZILLA=mozilla fi for URL in "$@"; do if echo "$URL"|grep -q "^/"; then URL="file://$URL" elif [ -e "$PWD/$URL" ]; then URL="file://$PWD/$URL" fi $MOZILLA "$URL" & done