Penguin
Note: You are viewing an old revision of this page. View the current version.

HTTP handler issues

Set the preference

user_pref("network.protocol-handler.app.http", "/usr/local/bin/firefox-helper.sh");

and point it at the MozillaFirefoxStartupScript? or whatever your distribution uses natively.


In addition, so Thunderbird can redirect some additional protocls (FTP and HTTPS) add the following
user_pref("network.protocol-handler.app.https", "/location/to/firefox"); user_pref("network.protocol-handler.app.ftp", "/location/to/firefox");
As well as that, you can define another FTP program to handle the FTP transactions (though Mozilla handles them just fine, try the following
user_pref("network.protocol-handler.app.ftp", "/location/to/ftpprogram");

Thunderbird launch script

Here's the launcher script I use to start Thunderbird (installed from .tar.gz) in my Linux Mandrake 10.0. This script uses existing Thunderbird process if possible or launches a new one if needed. This script prints "./mozilla-xremote-client: Error: Failed to find a running server." in the terminal if no old process is running. I don't like the 'ping()' trick used in the MozillaFirefoxStartupScript? because it slows down the process. Instead I just try to use the remote and if it fails, I fall back to normal behavior.

#!/bin/bash2

# Make this script really quiet:
#exec &>/dev/null

# use UTF-8 environment
# change "fi_FI" to language code you prefer.
# for possible options "locale -a | grep UTF-8"
export LC_TIME=fi_FI.UTF-8
export LC_MONETARY=fi_FI.UTF-8
export LC_CTYPE=fi_FI.UTF-8

# executable name
mozexe="thunderbird"
# application name to use with remote, note the capital T in the start!
appname="Thunderbird"
# installation directory (just "tar zvfx package.tar.gz")
mozdir="/system/apps/mozilla-thunderbird/current"
# x-remote binary name
remote="mozilla-xremote-client"

# use lesser priority for Thunderbird, it likes to eat CPU
exec="exec nice "

pwd="$(pwd)"

# Change to Thunderbird install dir:
cd "$mozdir"

if [ "$1" != "" ]; then
        # FIXME remove "mailto:" from $1 if it's there
        ./$remote -a $appname "mailto($@)" || $exec ./$mozexe "mailto:$@" &
else
        ./$remote -a $appname "xfeDoCommand(openInbox)" || $exec ./$mozexe &
fi

# make sure that Mozilla doesn't die if current terminal is killed, bash2 feature
disown -a
# disown -h