UbuntuHelp:ThunderbirdDefaultMailerHowto
来自Ubuntu中文
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
This Howto shows how to make Thunderbird your default e-mailer in GNOME and for Firefox `mailto:` links. For 8.04 please carry out the following steps:
- Make sure you have Thunderbird installed.
- Open the menu on the panel and select System -> Preferences -> Preferred Applications.
- Under mail reader choose 'Thunderbird' from the dropdown menu.
That's all.
For older versions of Ubuntu or if the above does not work you could try this:
- Open the menu on the panel and select System -> Preferences -> Preferred Applications.
Open the Mail Reader tab and select the Custom checkbox. In the text field next to it, enter: `mailto %s` Now, click the Close button.
- Open a text editor and copy-and-paste the following shell script:
#!/bin/bash # mailto - handle mailto: links by opening the composer in thunderbird # Author: Christopher Arndt <chris at chrisarndt dot de> # find thunderbird executable for prog in thunderbird mozilla-thunderbird; do if [ -n "$(which "$prog" 2>/dev/null)" ]; then TB="$prog" break fi done if [ -z "$TB" ]; then echo "Thunderbird executable not found." 2>&1 exit 1 fi if $TB -remote "ping()" &>/dev/null; then # strip "mailto:" prefix when using -remote CMD="${1#mailto:}" exec $TB -remote "mailto($CMD)" &>/dev/null else # suppress any output from thunderbird to stdout/stderr # remove "&>/dev/null" if you don't like this exec $TB "$@" &>/dev/null fi
- Save this shell script to a file named `mailto`.
- Then open a terminal window, change to the directory where you saved the script and issue the following command:
sudo install mailto /usr/local/bin
This will install the shell script into `/usr/local/bin` and make it executable. Now, when you click on a `mailto:` link in Firefox, Thunderbird will open a new composer window. When Thunderbird is already running, it will not start another instance of Thunderbird, but will just ask Thunderbird to open a new message window. This prevents Thunderbird from trying to open a new instance with a different user profile. If the `mailto` script is started without arguments, and Thunderbird is not already running, it will just open the Thunderbird main window. If it detects a running Thunderbird, it will open a new message window with an empty `To:` address line.