#855859 xdg-utils: xdg-email doesn't work with Debian's Thunderbird wrapper script

#855859#5
Date:
2017-02-22 14:46:50 UTC
From:
To:
Dear Maintainer,

the new thunderbird package in Debian introduced a wrapper script, which
breaks xdg-email. See

jirka@debian:/mnt/v$ xdg-email mailto:123@xxx.xxx
Illegal option -c

Usage: thunderbird [-h|-vg|-- @args]

This is because teh wrapper script expects real thunderbird options to
come after a --. Ie. "thunderbird -- -compose" works, "thunderbird
-compose" doesn't.

For a fix, you can just add -- to the command line when
launching. Luckily enough, this doesn't break even when thunderbird is
the vanilla executable. The attached patch should do the trick.

For a reference, see bugs #855406 and #855334.

Thanks for your effort

  Jiri Palecek
--- /usr/bin/xdg-email
+++ /usr/bin/xdg-email
@@ -555,7 +555,7 @@

     NEWMAILTO=$(echo "$NEWMAILTO" | sed 's/^,//')
     DEBUG 1 "Running $THUNDERBIRD -compose \"$NEWMAILTO\""
-    "$THUNDERBIRD" -compose "$NEWMAILTO"
+    "$THUNDERBIRD" -- -compose "$NEWMAILTO"
     if [ $? -eq 0 ]; then
         exit_success
     else

#855859#14
Date:
2017-02-22 18:06:26 UTC
From:
To:
Control: tags 855859 - patch

I'm fairly sure this should be fixed in the thunderbird wrapper script
(#855872), not here. If the thunderbird wrapper script is not command-line
compatible with Mozilla Thunderbird then it shouldn't have the same name.

    S

#855859#21
Date:
2026-06-29 16:06:40 UTC
From:
To:
xdg-email is currently being refactored upstream. See:

https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/153