------------------------------------------------------------------------
#!/bin/sh #set -x # Uncomment "set -x" for debugging
export MOZILLA_FIVE_HOME="/usr/lib/MozillaFirebird" FIREBIRD_PATH="/usr/lib/MozillaFirebird"
if [ -z "`ps x | grep \"[0-9] ${FIREBIRD_PATH}/MozillaFirebird-bin\"`" ]; then
# No MozillaFirebird running
${FIREBIRD_PATH}/MozillaFirebird $@
else
# MozillaFirebird running - open a new window
${FIREBIRD_PATH}/MozillaFirebird -remote "openURL($@ ,new-window)"
fi
------------------------------------------------------------------------
#!/bin/bash #set -x # Uncomment "set -x" for debugging
export MOZILLA_FIVE_HOME="/usr/lib/thunderbird"
#check if command line arguments have the form "mailto:somebody somewhere com?subject=something" #if that's true put "somebody somewhere com?subject=something" in MAILTO address MAILTO=`echo $@ | awk 'BEGIN{FS=":"} $1 ~ /mailto/ {print $2}'`
THUNDERBIRD_PATH="/usr/lib/thunderbird"
if [ -z "`ps x | grep \"[0-9] ${THUNDERBIRD_PATH}/thunderbird-bin\"`" ]; then
# No thunderbird running
${THUNDERBIRD_PATH}/thunderbird $@
else
# thunderbird running - raise window
${THUNDERBIRD_PATH}/thunderbird -remote "xfeDoCommand(openInbox)"
fi
if [ -n "$MAILTO" ]; then ${THUNDERBIRD_PATH}/thunderbird -remote "mailto($MAILTO)" fi