You are not logged in.

#1 2003-12-23 06:15:39

_JeffG_
Member
Registered: 2003-08-04
Posts: 61
Website

mozilla startup script

I borrowed this from FreeBSD and made it work on Arch.  I prefer it to the default arch mozilla startup script because it allows me to create a mail icon which works regardless if the browser is currently running or not.

#!/bin/sh

MOZILLA_DIR="/opt/mozilla/bin"
MOZILLA_EXEC="mozilla"
LOCATION='new-tab'

cd $MOZILLA_DIR                                     || exit 1

case $1 in
    -browser)
        REMOTE_COMMAND="xfeDoCommand (openBrowser)"
        ;;
    -mail)
        REMOTE_COMMAND="xfeDoCommand (openInbox)"
        ;;
    -compose)
        REMOTE_COMMAND="xfeDoCommand (composeMessage)"
        ;;
    -*)
        exec ./$MOZILLA_EXEC "$@"
        ;;
    *)
        REMOTE_COMMAND="openURL($@, $LOCATION)"
        ;;
esac

# process found
./$MOZILLA_EXEC -remote "ping()"                    &&
./$MOZILLA_EXEC -remote "$REMOTE_COMMAND"           && exit 0

# no existing process
exec ./$MOZILLA_EXEC "$@"

If you like it, thank the person who actually wrote it.   It was not me.

Jeff

Offline

Board footer

Powered by FluxBB