António P.F.Ferreira de Almeida wrote:
Has someone tried, in Suse 9.1, open a mail program (Thunderbird) from
Firefox 1.0 mail button, and/or call Firefox from that mail program ?
How to do it ?
I found an explanation somewhere, I believe it was the firefox faq. This
is the solution for the second part:
Add to your ~/.thunderbird/default/.slt/user.js
user_pref("network.protocol-handler.app.http",
"/home/<username>/bin/firefox-script");
user_pref("network.protocol-handler.app.https",
"/home/<username>/bin/firefox-script");
user_pref("network.protocol-handler.app.ftp",
"/home/<username>/bin/firefox-script");
with firefox-script containing something like:
#! /bin/bash
url="$1"
if [ "x$url" = "x" ]; then
url="about:blank"
fi
if mozilla-xremote-client "openurl($url, new-tab)" 2>/dev/null ; then
exit 0;
else
kstart firefox "$url";
exit 0;
To get thunderbird as your default email-Program use Control Center ->
KDE Components -> Component Chooser -> email
and enter
thunderbird-script %t %s
in the "different email client" line
thunderbird-script should be in your PATH and contain something like
#! /bin/bash
to=$1;
subject=$2
if [ "x$to" = "x" ]; then
exit 0;
fi
if [ "x$subject" = "x" ]; then
if mozilla-xremote-client "mailto($to)" 2>/dev/null ; then
exit 0;
else
thunderbird -compose mailto:$to;
exit 0;
fi
else
if mozilla-xremote-client "mailto($to ? subject=$subject)"
2>/dev/null ; then exit 0;
else
thunderbird -compose mailto:$to;
exit 0;
fi
fi
This works for me with firefox 0.9 and thunderbird 0.8 on SuSE 9.1
YMMV.
Kolja