|  About Me  |  Blogs  |  Photos  |  Publications  |  Resume  | 

Thunderbird opens links from local file intead of real url

Thunderbird has this annoying behavior of opening links in emails from a temporary local file location instead of the real URL. This becomes a real problem when I try to open links in that page with a relative path. Today I found the solution to this problem. In short, write a launch script for the browser and tell thunderbird to open urls with that script. Here’s the customized script based on the thread:

#!/bin/sh

export MOZILLA_FIVE_HOME="/usr/lib/mozilla"

url="$1"
if [ "x$url" = "x" ]; then
  url="about:blank"
fi

if $MOZILLA_FIVE_HOME/mozilla-xremote-client openURL\("$url",new-window\); then
  exit 0
fi
exec /usr/bin/firefox "$url"

and tell thunderbird to call that script:

pref("network.protocol-handler.app.http","/work/scripts/launch-firefox.sh");
pref("network.protocol-handler.app.https","/work/scripts/launch-firefox.sh");

Leave a Reply

You must be logged in to post a comment.