Firefox to Thunderbird
1. Copy-paste the following codes into 2 seperate files, mailto-thunderbird.sh and newsto-thunderbird.sh
mailto-thunderbird.sh
Code: Select all
#!/bin/sh
#
#script author: asterix
#http://forums.mozillazine.org/viewtopic.php?p=136157#136157
export MOZILLA_FIVE_HOME=/location/to/thunderbird
if [ $(ps aux | grep thunderbird | wc -l) -gt 4 ]; then
# thunderbird is running (thunderbird est lance)
$MOZILLA_FIVE_HOME/thunderbird -remote "mailto($1?subject=$2)"
else
# thunderbird is not running (thunderbird n'est pas lance)
$MOZILLA_FIVE_HOME/thunderbird -P default -compose mailto:$1?subject=$2;fi
newsto-thunderbird.sh
Code: Select all
#!/bin/sh
#
#script author: asterix
#http://forums.mozillazine.org/viewtopic.php?p=136157#136157
export MOZILLA_FIVE_HOME=/location/to/thunderbird
if [ $(ps aux | grep thunderbird | wc -l) -gt 4 ]; then
# thunderbird is running (thunderbird est lance)
$MOZILLA_FIVE_HOME/thunderbird -remote "openURL($1)"
else
# thunderbird is not running (thunderbird n'est pas lance)
$MOZILLA_FIVE_HOME/thunderbird -P default -compose news $1;
fi
2.Make the scripts executable with command:
Code: Select all
chmod +x mailto-thunderbird.sh
chmod +x newsto-thunderbird.sh
3. Install mozex (mozex.mozdev.org) in Firefox.
4. From the mozex options set it to intercept mailto and news links and put the following parameters:
mailto :
Code: Select all
/location/to/script/mailto-thunderbird.sh %a %s
news:
Code: Select all
/location/to/script/newsto-thunderbird.sh %r
Finished with this one!
Thunderbird to Firefox
1. Copy-paste the following code into the file urlto-firefox.sh
Code: Select all
#!/bin/sh
export MOZILLA_FIVE_HOME=/location/to/firefox
if [ $(ps aux | grep firefox | wc -l) -gt 4 ]; then
# firefox is running
$MOZILLA_FIVE_HOME/firefox -remote "openURL($1)"
else
#firefox is not running
$MOZILLA_FIVE_HOME/firefox -P default $1;
fi
2. make it executable with command:
Code: Select all
chmod +x urlto-firefox.sh
3. Edit the prefs.js file in your Thunderbird profile directory and add the following command:
Code: Select all
user_pref("network.protocol-handler.app.http", "/path/to/script/urlto-firefox.sh");
Finished!
These scripts are not completely mine but the base was taking from other scripts as you can see.
Hope it helps you.