Email option in "Simple Scan" does not open Thunderbird under Mate

Bug #1196220 reported by XELfmomrmbug
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux Mint
New
Undecided
Unassigned

Bug Description

Under Linux Mint 14 xdg-email displays the default browser instead of Thunderbird. I don't see any code in the script to support with Mate. Presume also present in Linux Mint 15.

This problem is persistent.

I have already raised this upstream https://bugs.freedesktop.org/show_bug.cgi?id=66394

Sorry if I am not following the correct processes.

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Platform:

$ cat /etc/lsb-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=14
DISTRIB_CODENAME=nadia
DISTRIB_DESCRIPTION="Linux Mint 14 Nadia"
$
$ uname -a
Linux [SNIP] 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686 athlon i686 GNU/Linux
$

Version:

xdg-utils 1.1.0~rc1-2ubuntu6

How to replicate:
    Install "Simple Scan" in a Linux Mint 14 installation.
    Start "Simple Scan" within a Mate desktop.
    Select Document->Email from "Simple Scan" menu.
    Expected Result - Thunderbird email window is opened.
        Actual Result - default browser is opened

Revision history for this message
XELfmomrmbug (xelfmomrmbug) wrote :
Revision history for this message
Thomas E. Horner (thomas.horner) wrote :

with the following patch "simple-scan" -> "Email" works correctly 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"

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

Other bug subscribers

Remote bug watches

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