Code: Select all
#script author: asterix, except the "sed", from the icycle script and the first if (I put it)
#http://forums.mozillazine.org/viewtopic.php?p=136157#136157
export MOZILLA_FIVE_HOME=/opt/thunderbird
url=`echo "$1" | sed -e's/^mailto://'`
if [ $# == "0" ]; then /opt/thunderbird/thunderbird
else
if [ $(ps aux | grep thunderbird | wc -l) -gt 4 ]; then
# thunderbird is running (thunderbird est lance)
$MOZILLA_FIVE_HOME/thunderbird -remote "mailto($url)"
else
# thunderbird is not running (thunderbird n'est pas lance)
$MOZILLA_FIVE_HOME/thunderbird -P default -compose mailto:$url;
fi
fi
Hope that someone will find this useful, you can put it as default Gnome or KDE mail program