This is also an issue with Ubuntu 12.04.  It is also likely a duplicate
of a few other bugs:

https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1277884
https://bugs.launchpad.net/ubuntu/+source/simple-scan/+bug/515386

The problem appears to be with a few bugs in /usr/bin/xdg-email:

#1: The function desktop_file_to_binary() runs a grep command which
attempts to extract the name of the email executable from
~/.local/share/applications/thunderbird.desktop by finding a line in it
which begins "Exec=thunderbird <args>".  Unfotunately, there are several
of these matching lines in the thunderbird.desktop file:

Exec=thunderbird %u
Exec=thunderbird -compose
Exec=thunderbird -addressbook

The grep command finds all of them, and the subsequent call to "which"
to find the executable looks for a program called "thunderbird
thunderbird thunderbird".  This can be fixed by adding a "-m 1" flag to
the grep command to stop at the first instance.

#2: In the function open_gnome(), it calls desktop_file_to_binary() with
the argument $browser when it should use the argument $desktop.  (The
function open_lxde() calls desktop_file_to_binary() correctly with
$desktop.)

Both of these observations were pointed out previously in:
https://bugs.launchpad.net/ubuntu/+source/simple-scan/+bug/515386/comments/44

After making these two changes, xdg-email correctly calls
    /usr/lib/thunderbird/thunderbird.sh -compose "attachment='<filename>'"
instead of
    gvfs-open "mailto:?attach=<filename>"

The problem has nothing to do with thunderbird's inability to handle
mailto: attachments.

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

Title:
  xdg-email fails to add attachment with Thunderbird

Status in xdg-utils package in Ubuntu:
  Confirmed

Bug description:
  Attachment is not added even though I can attach files from command-
  line using the following command thunderbird -remote
  
"xfeDoCommand(composeMessage,subject='S',to='y...@example.com',body='B',attachment='/some/absolute/file.txt')"

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: xdg-utils 1.1.0~rc1-2ubuntu7.1
  ProcVersionSignature: User Name 3.13.0-40.69-generic 3.13.11.10
  Uname: Linux 3.13.0-40-generic x86_64
  ApportVersion: 2.14.1-0ubuntu3.6
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Thu Dec 11 10:24:08 2014
  InstallationDate: Installed on 2014-09-18 (83 days ago)
  InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 
(20140722.2)
  PackageArchitecture: all
  SourcePackage: xdg-utils
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1401632/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to