After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 326808 - command for thunderbird is broken
command for thunderbird is broken
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] Preferred applications
2.13.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 351920 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-01-13 09:36 UTC by Sebastien Bacher
Modified: 2006-12-17 15:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome-control-center-thunderbird-cmd-param.patch (1.82 KB, patch)
2006-01-16 23:59 UTC, Luca Cavalli
committed Details | Review
default-applications-thunderbird-cmd-param_2nd.patch (1.79 KB, patch)
2006-01-31 09:55 UTC, Luca Cavalli
none Details | Review
default-applications-thunderbird-compose.patch (1.86 KB, patch)
2006-03-23 10:30 UTC, Luca Cavalli
committed Details | Review

Description Sebastien Bacher 2006-01-13 09:36:57 UTC
This bug has been described on https://bugzilla.ubuntu.com/show_bug.cgi?id=22222

"gnome-default-applications-properties us for thunderbird this command:

mozilla-thunderbird -mail %s

but the correct one is

mozilla-thunderbird mailto:%s

if thunderbird is open, it couldn't handle "-mail" very well and open the
profile manager isntead a new-mail-window"
Comment 1 Luca Cavalli 2006-01-16 23:59:32 UTC
Created attachment 57507 [details] [review]
gnome-control-center-thunderbird-cmd-param.patch

Prepared a patch against the new capplet. Add "Reviewed by" to ChangeLog as appropriate.
Comment 2 Sebastien Bacher 2006-01-22 22:22:31 UTC
Thanks for your patch, feel free to commit it
Comment 3 Luca Cavalli 2006-01-22 22:47:53 UTC
Sebastien, I would be happy to commit the patch, but I haven't cvs account. Could you do it for me, please? Thanks.
Comment 4 Rodrigo Moya 2006-01-23 10:55:28 UTC
Committed, thanks
Comment 5 Matt MacLeod 2006-01-31 02:46:19 UTC
I think this fix may be incorrect. When I change to "mailto:%s" manually in preferred applications I get a compose window, but I get an extraneous "mailto:" in front of the e-mail address in the compose window. A bare "%s" works fine for me (in 1.5, at least), and I've been using "-compose %s" for some time in both 1.x and 1.5.
Comment 6 Luca Cavalli 2006-01-31 08:37:52 UTC
I'll try to install thunderbird and make some tests. In the meantime, can someone verify this bug and, in case, reopen it? Thanks.
Comment 7 Luca Cavalli 2006-01-31 09:55:12 UTC
Created attachment 58453 [details] [review]
default-applications-thunderbird-cmd-param_2nd.patch

I tested thunderbird 1.5. Since command line help suggests to use:
thunderbird [ options ... ] [URL]

It seems that the most correct way to handle this is:
thunderbird -compose mailto:%s

Can someone test this patch with older thunderbird versions too? Thanks.
Comment 8 Matt MacLeod 2006-01-31 16:25:38 UTC
The issue as far as I can tell is that e-mail links passed from Firefox (perhaps the most common use case) already have the "mailto:" appended and will get doubled up with that version.

I tested "mozilla-thunderbird -compose mmacleod@ieee.org" and "mozilla-thunderbird -compose mailto:mmacleod@ieee.org" at the command line and it brings up a compose window correctly with and without Thunderbird being open to begin with, and removes the mailto: if present. "thunderbird -compose %s" also strips the mailto: from Firefox links.

So I'd still say "-compose %s" is the way to go.
Comment 9 Luca Cavalli 2006-01-31 18:47:55 UTC
I can't reproduce the double "mailto:" with firefox. mmacleod, can you provide a sample .html file with those links, please? Anyway, I don't think firefox check for gnome gconf keys to get default email program, so maybe this behaviour can be unrelated to Preferred Applications.
Comment 10 Matt MacLeod 2006-02-01 00:13:46 UTC
See, for instance:

http://www.sce.carleton.ca/faculty/chinneck.html

For an e-mail link using mailto:, although any e-mail link on a webpage should use it.

I'm not sure if it's due to Ubuntu's firefox-gnome-support package, but on Ubuntu Firefox definitely respects this setting. As described at 

https://launchpad.net/distros/ubuntu/+source/mozilla-thunderbird/+bug/12097

this has been a problem there for a while. It was patched, then clobbered.

Even if this Ubuntu specific, "thunderbird -compose %s" still works for the bare e-mail case (passing user@domain.com), and handles the Firefox/Ubuntu case as well (passing mailto:user@domain.com), so I see no reason not to use it.
Comment 11 Sebastien Bacher 2006-03-22 09:19:58 UTC
Ubuntu bug comment:

"Actually, using "mailto:%s" means that clicking on a mailto: link from Firefox will result in a Thunderbird compose window with an address like "mailto:user@example.com", which is not right.

Using "mozilla-thunderbird -compose %s" instead will pop up just a compose window, and will fill in the mailto: information correctly."

"-compose %s" is correct according to submitter. Luca, what do you think about it?
Comment 12 Luca Cavalli 2006-03-22 13:50:36 UTC
I haven't Ubuntu, so I can't test it. On my Slackware Firefox doesn't use GNOME preferred applications settings, so I suspect the Firefox coming with Ubuntu uses a patch, my vanilla Firefox only runs Thunderbird (if installed). Anyway, if "-compose %s" works also with Firefox patched by other distros and with other web browsers (Epiphany, Galeon...) we can use it. maybe also worth reading this link: https://bugzilla.mozilla.org/show_bug.cgi?id=316177
Comment 13 Luca Cavalli 2006-03-23 10:30:54 UTC
Created attachment 61834 [details] [review]
default-applications-thunderbird-compose.patch

Epiphany doesn't work either with "-compose mailto:%s", it seems that the protocol name is always included in %s, so fixing the patch removing the extra "mailto:".
Comment 14 Rodrigo Moya 2006-03-23 10:36:02 UTC
If that fixes it for all reporters, please commit
Comment 15 Matt MacLeod 2006-03-23 14:40:43 UTC
Exactly, the e-mail link passed by the browser will have the mailto: in place already and pass it in the %s, that's how it knows it's an e-mail link to begin with.

Fixes for me (a Ubuntu reporter).  Thanks.
Comment 16 Luca Cavalli 2006-03-28 19:54:30 UTC
Patch committed to HEAD.
Comment 17 Sebastien Bacher 2006-08-18 14:45:56 UTC
*** Bug 351920 has been marked as a duplicate of this bug. ***
Comment 18 Loïc Minier 2006-08-18 19:04:33 UTC
Hi,

I'm reopening the bug as the behavior with "-compose" seems incorrect (I opened Bug 351920 because of this, but it was merged here in).

My two use cases are:
1) clicking on a "mailto:" link on a web page
2) selecting "Tools" > "Read Mail" in Firefox

Currently, with "-compose", use case 2) fails, hence the proposed patch to drop the "-compose" altogether, this works for both use cases, and this works in both epiphany and firefox.

Bye,
Comment 19 Alexey Rusakov 2006-11-24 00:51:31 UTC
Another way of triggering the case 2) is to set a keybinding for 'E-mail' and try to use it without started Thunderbird. Thunderbird does start, but opens a Compose window instead of the main window, which is most likely not what expected.
Comment 20 Luca Cavalli 2006-12-17 15:48:54 UTC
Thunderbird command line patched removing '-compose'.