$ git diff xdg-email diff --git a/scripts/xdg-email b/scripts/xdg-email index 6ead033..3a22152 100755 --- a/scripts/xdg-email +++ b/scripts/xdg-email @@ -500,8 +500,26 @@ open_gnome() open_xfce() { - DEBUG 1 "Running exo-open \"$1\"" - exo-open "$1" + DEBUG 5 "open_xfce - Trying to use Thunderbird to send message" + local client + client=`gconftool-2 --get /desktop/gnome/url-handlers/mailto/command | cut -d ' ' -f 1` || "" + echo $client | grep thunderbird > /dev/null 2>&1 + if [ $? -eq 0 ] ; then + DEBUG 5 "open_xfce - Running Thunderbird (${client})" + run_thunderbird "$client" "$1" + # No need to handle sucess or failure - run_thunderbird + # sub-routine terminates script. + fi + DEBUG 5 "open_xfce - FAILED to use Thunderbird to send message" + + # We only reach this point if we have failed to start Thunderbird. + # The exo-open utility does not appear to support opening a + # message window. + # The exo-open utility does not support the "mailto:" URL. + param=`echo $1 | sed 's/mailto\:/MailReader/'` + DEBUG 5 "open_xcfe - Falling back to exo-open \"${param}\"" + # exo-open --launch "${param}" + exo-open --launch ${param} if [ $? -eq 0 ]; then exit_success $