Launchpad has imported 23 comments from the remote bug at https://bugzilla.mozilla.org/show_bug.cgi?id=1680527.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2020-12-03T16:18:39+00:00 Sebastien Bacher wrote: User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0 Steps to reproduce: The bug was reported against the snap on https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805 ' Thunderbird snap keeps asking to be the default email client ' The issue is similar to firefox bug 512305 , the approach for writing to ~/.local/share/applications directly isn't going to work for confined applications Actual results: Thunderbird changes the default mimetype association in its private snap directory Expected results: The default is changed in the real user directory. Calling xdg-settings is proxyed to snapd and leads to the correct result Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/2 ------------------------------------------------------------------------ On 2020-12-03T16:22:03+00:00 Sebastien Bacher wrote: Created attachment 9191065 thunderbird-xdg-settings.patch The attached patch is similar to what firefox has been doing in https://hg.mozilla.org/releases/mozilla-release/rev/74e95f9fb43e (the snap env detection has been updated to be similar to what firefox is currently doing which is a bit different from what first landed) Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/3 ------------------------------------------------------------------------ On 2020-12-05T23:02:13+00:00 Rob Lemley wrote: It looks reasonable enough and applied cleanly to current Daily code. I started up a try (Daily version) build with it applied. Any chance of getting a proper patch with the a checkin comment and author information included? Try build: https://treeherder.mozilla.org/jobs?repo=try-comm- central&selectedTaskRun=FlDpf85IR6C3AvUa4Cl4UQ.0&revision=8c6b6907e248c88ad5f0bcb3001d5d6c882a2d0c Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/4 ------------------------------------------------------------------------ On 2020-12-08T10:07:20+00:00 Sebastien Bacher wrote: Thanks for the review, I'll update the patch in the next days as requested, I just need to figure out the proper mercurial workflow Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/5 ------------------------------------------------------------------------ On 2020-12-08T20:58:40+00:00 Mkmelin+mozilla wrote: Please see https://developer.thunderbird.net/thunderbird- development/fixing-a-bug For patches, it's what `hg export` gives you, not `hg diff` (and do set your name/addr up in hg) Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/6 ------------------------------------------------------------------------ On 2020-12-09T19:58:58+00:00 Sebastien Bacher wrote: Created attachment 9192263 Use xdg-settings in the snap to set default Thanks for the pointer, I had read that documentation but got lost in the queues details. I've screwed my checkout but I'm adding one with the author/description at least, if that's not enough to commit let me know and I will try to do again a proper checkout to have the right commit id reference Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/7 ------------------------------------------------------------------------ On 2020-12-10T00:11:37+00:00 Rob Lemley wrote: I built a Snap package with this applied (Thunderbird Daily) and it didn't work. I'll try applying it to 78.6 tomorrow and see if it fares better. (Using Ubuntu's snap sources and a build I ran on try-c-c.) xdg-settings reports that Thunderbird is the default mail client, but I keep getting the popup when I start it. I checked for the SNAP_NAME environment variable on the process and it is set to "thunderbird". Test system is Ubuntu LTS (20.04.1). Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/8 ------------------------------------------------------------------------ On 2020-12-10T12:07:04+00:00 Mkmelin+mozilla wrote: Comment on attachment 9192263 Use xdg-settings in the snap to set default Review of attachment 9192263: ----------------------------------------------------------------- ::: mail/components/shell/nsGNOMEShellService.cpp @@ +241,5 @@ > + } > + if (strcmp(output, "thunderbird.desktop\n") == 0) { > + g_free(output); > + return true; > + } This part doesn't seem to follow what firefox currently has..? Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/9 ------------------------------------------------------------------------ On 2020-12-10T19:53:34+00:00 Sebastien Bacher wrote: (In reply to Magnus Melin [:mkmelin] from comment #7) > Comment on attachment 9192263 > Use xdg-settings in the snap to set default > > Review of attachment 9192263: > ----------------------------------------------------------------- > > ::: mail/components/shell/nsGNOMEShellService.cpp > @@ +241,5 @@ > > + } > > + if (strcmp(output, "thunderbird.desktop\n") == 0) { > > + g_free(output); > > + return true; > > + } > > This part doesn't seem to follow what firefox currently has..? That's because firefox uses {"xdg-settings", "check", "default-web-browser", "firefox.desktop", nullptr}; there is no equivalent for other protocols so the thunderbird patch was written using {"xdg-settings", "get", "default-url-scheme-handler", aProtocols[i], nullptr}; the firefox command returns a yes/no answer to the question "is firefox.desktop the default web browser", where the thunderbird one returns a string answer to the question "what .desktop is the default for the url scheme" Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/10 ------------------------------------------------------------------------ On 2020-12-10T21:05:23+00:00 Sebastien Bacher wrote: (In reply to Rob Lemley [:rjl] from comment #6) > I built a Snap package with this applied (Thunderbird Daily) and it didn't > work. I'll try applying it to 78.6 tomorrow and see if it fares better. > (Using Ubuntu's snap sources and a build I ran on try-c-c.) > > xdg-settings reports that Thunderbird is the default mail client, but I keep > getting the popup when I start it. I checked for the SNAP_NAME environment > variable on the process and it is set to "thunderbird". > > Test system is Ubuntu LTS (20.04.1). Thanks Rob, how did you build the snap? The current snap in the store is using the upstream binary builds and not building from source. I didn't have a chance to test in a real snap environment but I did check using 'SNAP_NAME=thunderbird thunderbird' non confined with a local build, there might be a difference in behaviour. Also under what desktop environment did you try? Checking a bit manually in the thunderbird snap env though there seems to be an issue with the snapd wrapper and subcommands so that might need to be resolved first for the patch to work correctly. Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/11 ------------------------------------------------------------------------ On 2020-12-11T02:11:31+00:00 Rob Lemley wrote: The build was done on our try server, so configuration wise, it's the same as the release builds. The Snap I built on an Ubuntu 20.04.1 VM. The snapcraft.yaml and such I just downloaded from Launchpad. I replaced the download URL with the tar file from try (and removed the langpacks) and built. I did wind up using LXC instead of Multipass. The only other difference would be the version; this was Thunderbird 85.0a1 instead of 78.x. The test environment was the same VM using GNOME desktop. New VM, nothing changed other than apt install-ing the latest updates. I did the same with 78.6.0-pre + this patch to see if that made a difference; same result. Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/12 ------------------------------------------------------------------------ On 2020-12-11T08:35:42+00:00 Sebastien Bacher wrote: Thanks Rob for the details! Is the download URL you used public or could you share your .snap? It would make easier for me to test the end result as well in a real configuration. I believe the patch isn't going to work correctly until the snapd xdg- settings wrapper gets a fix for not handling subcommand arguments correctly. I'm going to work on a patch for that and will comment here once it's up, ideally I would like to test things together with the fixed snapd and a patch thunderbird snap to ensure things indeed work correctly. Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/13 ------------------------------------------------------------------------ On 2020-12-11T17:19:10+00:00 Rob Lemley wrote: Created attachment 9192675 snapcraft.yaml Here's the link to the build in Treeherder: https://treeherder.mozilla.org/jobs?repo=try-comm- central&revision=8defd41a707df3ae6eb2ab6deaa25cdadf253cb1 And the actual tar file: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/fXLwVrFfSPGdrnboBE9JaA/runs/0/artifacts/public/build/target.tar.bz2 (You find that by clicking on "B" next to Linux x64 opt, then in the pane that pops up click "Artifacts" and within that you'll find the link to "target.tar.bz2". The debug build is there as wel if it's helpful.) I've attached my modified snapcraft.yaml file. Everything else was the same as in Launchpad. Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/14 ------------------------------------------------------------------------ On 2020-12-14T20:22:09+00:00 Sebastien Bacher wrote: @Rob, Thanks for the details that should help me testing. I've reported the snapd issue now with a patch, https://github.com/snapcore/core18/pull/175 The change is going to be needed for xdg-settings to do the right thing and the thunderbird patch to be functional Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/15 ------------------------------------------------------------------------ On 2020-12-18T02:28:00+00:00 Rob Lemley wrote: I see the patch to snapd in comment 13 was merged, so I updated the test VM I have with latest/candidate and confirmed that the test Snap I built and tested in comment 10, there is no longer a prompt to set the default mail client. Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/16 ------------------------------------------------------------------------ On 2020-12-18T02:33:24+00:00 Rob Lemley wrote: Comment on attachment 9192263 Use xdg-settings in the snap to set default Tested locally on a snap built with this patch and an updated snapd with fixes (esr78). Let's get this landed into comm-central, and I'll request uplift to beta and then to esr78. Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/17 ------------------------------------------------------------------------ On 2020-12-18T05:09:49+00:00 Pulsebot wrote: Pushed by [email protected]: https://hg.mozilla.org/comm-central/rev/5fb1b586974d set the default handler in the snap using xdg-settings. r=rjl Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/18 ------------------------------------------------------------------------ On 2020-12-18T18:29:30+00:00 Rob Lemley wrote: Comment on attachment 9192263 Use xdg-settings in the snap to set default [Approval Request Comment] Regression caused by (bug #): User impact if declined: Users that use Canonical's Thunderbird Snap package get a popup asking to make Thunderbird the default mail client even if it already is Testing completed (on c-c, etc.): This fix was originally tested by myself on c-esr78, details are described above. The code itself is based on what Firefox has had for some time to set the default browser when running as a Snap. The basic structure of the change has been battle tested, even if this specific implementation has not. Testing does require that our Thunderbird builds get turned into a Snap package, so I plan to verify nightly and beta pretty quickly. Risk to taking this patch (and alternatives if risky): It's possible that this could break default mail client settings for non-snap users, but as noted above this has been on Firefox for some time. Assuming there are no regressions on nightly, I'd like to fast track this and get it in to 78.6.1 since the fix is specific to the Snap build that Canonical does and they only build for release versions. Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/19 ------------------------------------------------------------------------ On 2020-12-29T14:30:32+00:00 Vseerror wrote: Comment on attachment 9192263 Use xdg-settings in the snap to set default [Triage Comment] Approved for beta Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/20 ------------------------------------------------------------------------ On 2020-12-29T15:49:28+00:00 Rob Lemley wrote: Thunderbird 85.0b3: https://hg.mozilla.org/releases/comm-beta/rev/426ab630f36c Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/21 ------------------------------------------------------------------------ On 2021-01-06T01:21:39+00:00 Vseerror wrote: Comment on attachment 9192263 Use xdg-settings in the snap to set default [Triage Comment] Approved for esr78 Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/22 ------------------------------------------------------------------------ On 2021-01-06T17:53:51+00:00 Rob Lemley wrote: Thunderbird 78.6.1: https://hg.mozilla.org/releases/comm-esr78/rev/af22c7af60f0 Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/23 ------------------------------------------------------------------------ On 2021-01-15T16:15:58+00:00 Sebastien Bacher wrote: Thanks, I've tested using thunderbord 78.6.1 and the core18 snap from the candidate channel and clicking 'set default' correctly trigger the portal prompt and success in setting the default Reply at: https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1903805/comments/24 ** Changed in: thunderbird Status: Unknown => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1903805 Title: Thunderbird snap keeps asking to be the default email client To manage notifications about this bug go to: https://bugs.launchpad.net/thunderbird/+bug/1903805/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
