After upgrade keyboard "mail" shortcut does not work

Bug #630281 reported by David Henningsson on 2010-09-04
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mozilla Thunderbird
Fix Released
Medium
One Hundred Papercuts
Undecided
Unassigned
thunderbird (Ubuntu)
Medium
Chris Coulson
Lucid
Medium
Chris Coulson
Maverick
Medium
Chris Coulson

Bug Description

Binary package hint: thunderbird

After having upgraded thunderbird, the XF86Mail keyboard shortcut does no longer work. I'm left with the following error message:
"Couldn't execute command: /usr/lib/thunderbird-3.1.2/thunderbird ""
Verify that this is a valid command."

Starting it from the menu and letting it check that it is the default mail client fixes the problem...until next upgrade.

I've seen it in both Lucid and Maverick.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: thunderbird 3.1.3+build1+nobinonly-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-19.28-generic 2.6.35.3
Uname: Linux 2.6.35-19-generic x86_64
Architecture: amd64
Date: Sat Sep 4 17:37:40 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100826)
ProcEnviron:
 LANG=sv_SE.utf8
 SHELL=/bin/bash
SourcePackage: thunderbird

David Henningsson (diwic) wrote :
David Henningsson (diwic) wrote :

This should be relatively easy to fix with a postinst script, so marking it as a papercut bug.

Micah Gersten (micahg) wrote :

Thank you for reporting this to Ubuntu. This is not a thunderbird issue. The shortcut should point to /usr/bin/'thunderbird which will always be there.

affects: thunderbird (Ubuntu) → ubuntu
tags: added: needs-reassignment
Micah Gersten (micahg) wrote :

That should be /usr/bin/thunderbird, but you get the idea :)

David Henningsson (diwic) wrote :

Right, but isn't thunderbird the one who sets that shortcut in the first place, if you have it "check that it is the default e-mail client"?

Vish (vish) wrote :

Thank you for bringing this bug to our attention. However, a paper cut should be a small usability issue, in the default Ubuntu install, that affects many people and is quick and easy to fix. So this bug can't be addressed as part of this project.

 - We dont include Thunderbird in the default install. Hence not a papercut
For further information about papercuts criteria, please read https://wiki.ubuntu.com/PaperCut.
Don't worry though, this bug has been marked as "Invalid" only in the papercuts project.

Changed in hundredpapercuts:
status: New → Invalid
Chris Coulson (chrisccoulson) wrote :

I think thunderbird is setting a bogus value in /desktop/gnome/url-handlers/mailto/command (although, in my case it's actually setting a completely empty value when i choose it as the default mail client)

affects: Ubuntu Maverick → thunderbird (Ubuntu Maverick)
Changed in thunderbird (Ubuntu Maverick):
importance: Undecided → Medium
milestone: none → ubuntu-10.10
status: New → Triaged
Changed in thunderbird (Ubuntu Maverick):
assignee: nobody → Chris Coulson (chrisccoulson)
Chris Coulson (chrisccoulson) wrote :

So, we actually need a patch similar to lp185622_system_path_default_browser.patch that we ship in Firefox. However, that patch is pretty distro-specific, so I'd like to do something that might stand more chance of being landed upstream

affects: thunderbird (Ubuntu Maverick) → Ubuntu Maverick
affects: Ubuntu Lucid → thunderbird (Ubuntu Lucid)
Changed in thunderbird (Ubuntu Lucid):
status: New → Triaged
assignee: nobody → Chris Coulson (chrisccoulson)
importance: Undecided → Medium
milestone: none → lucid-updates
Chris Coulson (chrisccoulson) wrote :

This is actually semi-broken in Firefox too. Firefox is setting the full path (ie, /usr/bin/firefox) as the default browser, which makes gnome-default-application-properties show the default browser as "Custom" rather than Firefox

Changed in thunderbird (Ubuntu Maverick):
status: Triaged → In Progress

Created attachment 472595
Set the default mail handler to thunderbird if it exists in the users $PATH

This bug was reported in Launchpad: https://launchpad.net/bugs/630281

Currently, when you set Thunderbird to be the default mail client from the Thunderbird UI on GNOME, it sets "/desktop/gnome/url-handlers/mailto/command" to something like $XCurProcD/thunderbird (on Ubuntu, this path is currently /usr/lib/thunderbird-3.1.3/thunderbird).

This has a couple of problems:

1) It breaks upgrades if the path has the version number in it (which is the Ubuntu bug). Ok, I suppose that could also be argued as a distro-problem too.

2) It causes the default mail client in gnome-default-application-properties to be displayed as "Custom" rather than "Thunderbird". This is because the settings dialog expects the setting to just be an executable in the users path. I suppose that could be changed too, but that isn't how other applications work.

3) Setting the default mail client in gnome-default-application-properties to Thunderbird doesn't stop Thunderbird asking to be the default mail client.

The way I think that this should work is:

1) If thunderbird is in the users path and it is a symbolic link to something in $XCurProcD, set the key to "thunderbird %s", else...
2) Fall back to "$XCurProcD/thunderbird %s".

So, most users with a single install of Thunderbird will have the key set to "thunderbird %s". It also allows for users to download, extract and run other instances of Thunderbird if they want to, and still be able to set them as the default mail client too, without installing them properly (it would just use the full path for those in that case).

Attached is a first attempt at a patch to implement this behaviour, which is working ok here.

Chris Coulson (chrisccoulson) wrote :

Patch sent upstream for Thunderbird now

Changed in thunderbird:
status: Unknown → Confirmed

I need to review the patch in more detail but good idea.
Actually I'm carrying a patch with me since years which hardcodes mAppPath to /usr/bin/thunderbird.

I think it would be best if it used MOZ_APP_LAUNCHER instead, since it's what is provided to gnome_client_set_restart_command.

Also note firefox does the same as thunderbird.

Yeah, we're also carrying a distro-patch in Firefox that hardcodes the same to /usr/bin/firefox.

I wasn't aware of MOZ_APP_LAUNCHER before, I'll have a look at that too.

Thanks

Created attachment 474767
Set the default mail handler to MOZ_APP_LAUNCHER if it is set

Here is an updated patch which uses MOZ_APP_LAUNCHER if it is set. If it isn't set, then it falls back to the current behaviour.

I've tested this and it seems to behave correctly with all combinations of relative/absolute path and with/without the launcher in the users $PATH.

Changed in thunderbird:
importance: Unknown → Medium

Comment on attachment 474767
Set the default mail handler to MOZ_APP_LAUNCHER if it is set

Looks good to me! r=mkmelin

>-nsMailGNOMEIntegration::nsMailGNOMEIntegration(): mCheckedThisSession(PR_FALSE)
>+nsMailGNOMEIntegration::nsMailGNOMEIntegration():

Minor nit: trailing space

Chris Coulson (chrisccoulson) wrote :

bzr commit -m '* Fix LP: #630281 - After upgrade keyboard "mail" shortcut does not work.
  Set the default client launcher to MOZ_APP_LAUNCHER rather than the
  executable in our volatile install directory. Define MOZ_APP_LAUNCHER
  in the launcher shell script
  - add bz593948_att474767_lp630281_moz_app_launcher_for_default_client.patch
  - update debian/patches/series
  - update debian/thunderbird.sh.in' --fixes 'lp:630281'
Committing to: /home/chr1s/src/thunderbird/3.0/
modified debian/changelog
modified debian/thunderbird.sh.in
added debian/patches/bz593948_att474767_lp630281_moz_app_launcher_for_default_client.patch
modified debian/patches/series
Committed revision 206.

Changed in thunderbird (Ubuntu Maverick):
status: In Progress → Fix Committed
Chris Coulson (chrisccoulson) wrote :

Ok, uploaded to Maverick now

Changed in thunderbird:
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thunderbird - 3.1.4+build2+nobinonly-0ubuntu3

---------------
thunderbird (3.1.4+build2+nobinonly-0ubuntu3) maverick; urgency=low

  * Fix LP: #630281 - After upgrade keyboard "mail" shortcut does not work.
    Set the default client launcher to MOZ_APP_LAUNCHER rather than the
    executable in our volatile install directory. Define MOZ_APP_LAUNCHER
    in the launcher shell script
    - add bz593948_att474767_lp630281_moz_app_launcher_for_default_client.patch
    - update debian/patches/series
    - update debian/thunderbird.sh.in
 -- Chris Coulson <email address hidden> Tue, 21 Sep 2010 21:05:31 +0100

Changed in thunderbird (Ubuntu Maverick):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thunderbird - 3.1.7+build3+nobinonly-0ubuntu0.10.04.1

---------------
thunderbird (3.1.7+build3+nobinonly-0ubuntu0.10.04.1) lucid-security; urgency=low

  [ Chris Coulson <email address hidden> ]
  * New upstream release v3.1.7 (THUNDERBIRD_3_1_7_BUILD3)
    - see USN-1020-1

  * Update packaging files for 3.1
    - update debian/thunderbird-dev.install
    - update debian/thunderbird-gnome-support.install
    - update debian/thundebird.install
  * Add build depends on libnotify-dev, libiw-dev, mesa-common-dev since
    xulrunner-1.9.2 based apps require them
    - update debian/control
  * Update mozclient to reference comm-1.9.2 branch
    - update debian/rules
    - update debian/mozclient/thunderbird.conf
  * Refresh patches
    - update debian/patches/add_syspref_dir.patch
    - update debian/patches/fix_install_sdk_bin.patch
    - update debian/patches/fix_installdir.patch
  * Fix LP: #630281 - After upgrade keyboard "mail" shortcut does not work.
    Set the default client launcher to MOZ_APP_LAUNCHER rather than the
    executable in our volatile install directory. Define MOZ_APP_LAUNCHER
    in the launcher shell script
    - add bz593948_att474767_lp630281_moz_app_launcher_for_default_client.patch
    - update debian/patches/series
    - update debian/thunderbird.sh.in
  * Fix LP: #411691 - many Exception... "update.locale file doesn't exist" in
    console
    - update debian/rules
  * Backport desktop file translations from Maverick
    - update debian/thunderbird.desktop
  * Fix LP: #563535 - thunderbird -g fails due to invoking "$LIBDIR/$META_NAME"
    instead of "$LIBDIR/$META_NAME"-bin
    - update debian/thunderbird.sh.in

  [ Micah Gersten <email address hidden> ]
  * Fix migrator to not reference beta profiles and simply ask if the user
    wants to use the Thunderbird 2 or Thunderbird 3 profile
    - update debian/migrator/main.c
    - update debian/thunderbird.sh.in
 -- Chris Coulson <email address hidden> Wed, 08 Dec 2010 15:52:32 +0000

Changed in thunderbird (Ubuntu Lucid):
status: Triaged → Fix Released
Changed in thunderbird:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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