xdg-email fails to launch Thunderbird

Bug #1019259 reported by Neil Romig on 2012-06-29
This bug affects 7 people
Affects Status Importance Assigned to Milestone
xdg-utils (Ubuntu)

Bug Description

When clicking "mailto:" links in Chromium, nothing happens. I have Googled around and found that Chromium uses xdg-email for these. I think the problems is the routine "desktop_file_to_binary" which returns empty because the grep for Exec finds three such lines in the file /usr/share/applications/thunderbird.desktop.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: xdg-utils 1.1.0~rc1-2ubuntu6
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Fri Jun 29 13:10:56 2012

InstallationMedia: Lubuntu 12.04 "Precise Pangolin" - Release amd64 (20120423)
PackageArchitecture: all
 PATH=(custom, user)
SourcePackage: xdg-utils
UpgradeStatus: No upgrade log present (probably fresh install)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xdg-utils (Ubuntu):
status: New → Confirmed
Derek L (ddl-lp) wrote :

I also encountered this bug. It affects any program that passes attachments to Thunderbird (I hit it while using DarkTable 1.1 under Ubuntu 12.10 Quantal Quetzal). See attached patch for a simple fix.

Note that there is a newer version of xdg-utils included in Debian, but it contains other bugs.

The attachment "xdg-email.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Hans Burg (thobe-so) on 2014-02-13
information type: Public → Public Security

i confirm that adding the patch sending email works again.
for readability i'd like to propose using | head -n 1, tough:

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 @@
         [ -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"
@@ -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"

To post a comment you must log in.
This report contains Public Security information  Edit
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.