GNOME Bugzilla – Bug 326808
command for thunderbird is broken
Last modified: 2006-12-17 15:48:54 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"
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.
Thanks for your patch, feel free to commit it
Sebastien, I would be happy to commit the patch, but I haven't cvs account. Could you do it for me, please? Thanks.
Committed, thanks
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.
I'll try to install thunderbird and make some tests. In the meantime, can someone verify this bug and, in case, reopen it? Thanks.
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.
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.
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.
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.
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?
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
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:".
If that fixes it for all reporters, please commit
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.
Patch committed to HEAD.
*** Bug 351920 has been marked as a duplicate of this bug. ***
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,
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.
Thunderbird command line patched removing '-compose'.