← Back to team overview

desktop-packages team mailing list archive

[Bug 515386] Re: No attachment when Thunderbird is set as default client.

 

with the following patch "simple-scan" -> "Email" works correctly on
Ubuntu 14.10 again:

the first change makes sure that only the first occurrence of Exec in thunderbird's desktop file is considered: | head -n 1.
the second change is a fix for what is clearly a bug (having $browser instead of the correct variable $desktop).


diff -u org/xdg-email fixed/xdg-email
--- org/xdg-email	2014-07-16 11:43:48.000000000 +0200
+++ fixed/xdg-email	2014-12-30 17:44:27.990930489 +0100
@@ -321,7 +321,7 @@
         file="$dir/applications/$desktop"
         [ -r "$file" ] || continue
         # Remove any arguments (%F, %f, %U, %u, etc.).
-        command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`"
+        command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//' | head -n 1`"
         command="`which "$command"`"
         readlink -f "$command"
         return
@@ -512,7 +512,7 @@
     local client
     local desktop
     desktop=`xdg-mime query default "x-scheme-handler/mailto"`
-    client=`desktop_file_to_binary "$browser"`
+    client=`desktop_file_to_binary "$desktop"`
     echo $client | grep thunderbird > /dev/null 2>&1
     if [ $? -eq 0 ] ; then
         run_thunderbird "$client" "$1"

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to thunderbird in Ubuntu.
https://bugs.launchpad.net/bugs/515386

Title:
  No attachment when Thunderbird is set as default client.

Status in Mozilla Thunderbird Mail and News:
  New
Status in Xdg-utils:
  New
Status in simple-scan package in Ubuntu:
  Confirmed
Status in thunderbird package in Ubuntu:
  Confirmed
Status in xdg-utils package in Ubuntu:
  Fix Released

Bug description:
  Currently, when thunderbird is set as the default email client, when
  simple-scan tries to open a new message using mailto: , a new message
  window is opened for thunderbird, but there are no attachment.

  This is probably due to Thunderbird who does not support attachment
  with mailto because it is considered unsecure, but still, this makes
  user experience very poor, as the user is left thinking "ok a new
  window opened, therefore the attachment must be somewhere..". And
  thunderbird is pretty popular.

  Fortunately this might be easy to "workaround". Picasa already did it
  using xdg-email script that I attached since its code show exactly
  what's needed. the run_thunderbird() function is the more important
  part in the file.

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/515386/+subscriptions