In case you did not already solve this issue yourself, I might as well give you some tips.
In the paper URL Dispatching on Linux the Mozilla Thunderbird developers tell you how to utilize a script to make this happen. However, the script has a glitch. It first tries to find the tool mozilla-xremote-client to open a link from an email in the browser window and tab that is currently active. If this fails the script then tries to open the Firefox binary directly. Both system calls are needed, because if Firefox is not running already it needs to be started by the script. The problem with this is, that the script suggests that both tools are located in the same directory, which is unfortunately not the case on my system (Debian). It was only when I looked at the script more carefully that I noticed why I always got the profile dialogue of Firefox after clicking on a link in an email. So I had to alter the script slightly to represent the two different locations of the utilized tools.
You should also remember to chmod u+x the script, otherwise you will get simply nothing after clicking a link. Not even an error message is shown.
I then wanted to further extend the functionality of the script to open links in new tabs in case I already had Firefox open with a bunch of important websites. To implement this, I simply changed the call of mozilla-xremote-client slightly.
[Update]
As the old script dated back to 24th of July 2004 I thought the time for some changes had come. Again I changed the script so that you can choose whether to open a new tab or a new window for the link you supplied by inventing a second command line argument. This recent change makes it possible for me to set the script as my standard browser handler in Gnome with the tab argument and to use it as an icon link to Firefox in my panel with the window option. If you set the script as your default Gnome browser handler you don’t even need to go through the Thunderbird configuration files.
Also the addional tool mozilla-xremote-client that was the cause of my initial rewriting of the shell script originally provided by the Mozilla Foundation is no longer needed. We simply call the Firefox binary with the additional command line parameter -remote.
The following examples should explain how to invoke the new script:
# open my blog in a new tab
./launchfirefox.sh tab http://blog.nachtarbeiter.net/
# open my blog in a new window
./launchfirefox.sh window http://blog.nachtarbeiter.net/
The modified version of .lauchfirefox.sh looks like this:
#!/bin/sh
# .launchfirefox.sh
MOZILLA_BINARY="/usr/share/mozilla-firefox/firefox"
MOZILLA_REMOTE="$MOZILLA_BINARY -remote"
invoke="$1"
if [ $invoke = tab ]; then
invoke="new-tab"
fi
if [ $invoke = window ]; then
invoke="new-window"
fi
url="$2"
if [ x$url = x ]; then
url="about:blank"
fi
if $MOZILLA_REMOTE openURL("$url","$invoke"); then
exit 0
fi
exec $MOZILLA_BINARY "$url"
Hopefully that will save you some time.