Like gaxprels said, it can be done with GNOME, but that's if you use GNOME. That also only works in some cases.
Here's how you'd do that for all. Also this will also setup Firefox so when you click on mailto it will open up Thunderbird. vwgtiturbo, if you used linuxpackages.net to install your Firefox, and Thunderbird then this can be done without changing anything. Else you need to change the install path from /usr/lib/mozilla-* to whatever the install path is.
Create a file called mailto.sh in /usr/lib/mozilla-firefox Make the file executable chmod +x mailto.sh
Edit the file to contain:
Code:
#!/bin/sh
url="$1"
export MOZILLA_FIVE_HOME=/usr/lib/mozilla-thunderbird
if [ $(pidof thunderbird-bin | wc -w) -gt 0 ]; then
# Thunderbird is running
url=`echo "$url" | sed -e's/^mailto://'`
$MOZILLA_FIVE_HOME/thunderbird -remote "mailto($url)"
else
# Thunderbird is not running
$MOZILLA_FIVE_HOME/thunderbird -P default -compose $url
fi
Now go an downloaded the extension MozEX located here: MozEX
You'll also need Show Old Extensions located here: Show Old Extensions
Okay, after those are installed restart Mozilla-Firefox, and goto Tools -> Extensions -> mozex -> Preferences. Now check Intercept mailto: clicks and in the Mailer field insert: /usr/lib/mozilla-firefox/mailto.sh %r
Now onto getting Thunderbird to load Firefox.
Create a file in /usr/lib/mozilla-thunderbird called openlink.sh Make the file executable chmod +x openlink.sh
Edit that file to contain:
Code:
#!/bin/sh
export MOZILLA_FIVE_HOME="/usr/lib/mozilla-firefox"
url="$1"
if [ "x$url" = "x" ]; then
url="about:blank"
fi
if $MOZILLA_FIVE_HOME/mozilla-xremote-client -a firefox openURL\("$url, new-tab"\); then
exit 0
fi
exec $MOZILLA_FIVE_HOME/firefox "$url"
After that create a file called user.js in /usr/lib/mozilla-thunderbird
Edit the file to contain:
Code:
user_pref("network.protocol-handler.app.http","/usr/lib/mozilla-thunderbird/openlink.sh");
user_pref("network.protocol-handler.app.https","/usr/lib/mozilla-thunderbird/openlink.sh");
user_pref("network.protocol-handler.app.ftp","/usr/lib/mozilla-thunderbird/openlink.sh");
That should do it. I'm sorry that this is so long, but right now it's the only way to do this. Hopefully by the time they reach 1.x status they will have simple fileds to enter your preferred browser without going through all this crap.
Bookmarks