Bug#948691: MOZ_APP_LAUNCHER
Control: merge 948691 980461 Control: forwarded -1 https://bugzilla.mozilla.org/show_bug.cgi?id=1494436 On Sat, 27 Nov 2021 at 07:13:20 +, Jonathan Krebs wrote: > Could you please explain, why Thunderbird should not set > [MOZ_APP_LAUNCHER]? Let me turn this round: why *should* Thunderbird set this environment variable? What benefit does it give Thunderbird to make any child process that happens to be Mozilla-based (even Firefox!) think it is part of Thunderbird? Firefox doesn't seem to need to do similarly; what's different in Thunderbird that makes this necessary? On Sat, 27 Nov 2021 at 08:46:16 +0100, Carsten Schoenert wrote: > But yeah, I have the same question, so Mike please, it would be nice to hear > some thoughts from you why setting MOZ_APP_LAUNCHER isn't something we > should do and what other options we have. I'm not Mike, but the obvious reason to not set MOZ_APP_LAUNCHER is: because it breaks Firefox when used as a URL handler by Thunderbird, by making Firefox think it's part of Thunderbird. https://bugs.debian.org/980461 seems to be basically the same bug, and points to upstream bug report https://bugzilla.mozilla.org/show_bug.cgi?id=1494436 where the other suggestion was to remove MOZ_APP_LAUNCHER from the environment before launching any external URL or MIME-type handler. I'll try to put together a patch for that. smcv
Bug#948691: MOZ_APP_LAUNCHER
Hello Jonathan, Am 27.11.21 um 08:13 schrieb Jonathan Krebs: Thanks for the reply. Could you please explain, why Thunderbird should not set it? And do you know the intended use of the variable? > On Fedora, Thunderbird and Firefox each set it. you only addressed the bug directly (after Mike has reassigned the report to Thunderbird), so Mike didn't get your message reached I guess as only the package maintainer will get messages that are addressed to the bug number. To get your message/question/comment to a dedicated person you will need that person explicitly added to the participants. But yeah, I have the same question, so Mike please, it would be nice to hear some thoughts from you why setting MOZ_APP_LAUNCHER isn't something we should do and what other options we have. I'm far away from knowing the internals of the source of Thunderbird like you do. -- Regards Carsten
Bug#948691: MOZ_APP_LAUNCHER
Thanks for the reply. Could you please explain, why Thunderbird should not set it? And do you know the intended use of the variable? On Fedora, Thunderbird and Firefox each set it.
Bug#948691: MOZ_APP_LAUNCHER
reassign 948691 thunderbird ok On Wed, Nov 24, 2021 at 02:19:15AM +0100, Jonathan Krebs wrote: > I have this behavior on firefox 94 from sid, > > I suspect the MOZ_APP_LAUNCHER environment variable, which is set by > thunderbird and evaluated in > browser/components/shell/nsGNOMEShellService.cpp:135 > > (Filtered) environment of firefox, when started through thunderbird (this > wants thunderbird.desktop as default browser): > We have thunderbird in $MOZ_APP_LAUNCHER and firefox in > $GIO_LAUNCHED_DESKTOP_FILE Thunderbird shouldn't set MOZ_APP_LAUNCHER. Mike
Bug#948691: MOZ_APP_LAUNCHER
Also removing the environment variable from thunderbird via gdb before clicking a link in an email will make firefox behave correctly, and starting firefox by env MOZ_APP_LAUNCHER=/usr/bin/pluma firefox will make firefox want to set pluma.desktop as default browser :)
Bug#948691: MOZ_APP_LAUNCHER
I have this behavior on firefox 94 from sid, I suspect the MOZ_APP_LAUNCHER environment variable, which is set by thunderbird and evaluated in browser/components/shell/nsGNOMEShellService.cpp:135 (Filtered) environment of firefox, when started through thunderbird (this wants thunderbird.desktop as default browser): We have thunderbird in $MOZ_APP_LAUNCHER and firefox in $GIO_LAUNCHED_DESKTOP_FILE DESKTOP_SESSION=mate GDM_LANG=de_DE.utf8 GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/firefox.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=3669595 HOME=/home/j LANG=C.UTF-8 LC_MEASUREMENT=en_DK.UTF-8 LC_PAPER=en_DK.UTF-8 LC_TIME=en_DK.UTF-8 LD_LIBRARY_PATH=/usr/lib/firefox LD_PRELOAD=libmozsandbox.so LOGNAME=j MATE_DESKTOP_SESSION_ID=this-is-deprecated MOZ_APP_LAUNCHER=/usr/bin/thunderbird MOZ_APP_SILENT_START= MOZ_ASSUME_USER_NS=1 MOZ_CRASHREPORTER_[...] MOZ_LAUNCHED_CHILD= MOZ_PROFILER_STARTUP= MOZ_SANDBOXED=1 MOZ_SANDBOX_USE_CHROOT=1402653184 TB_FAIL=0 TB_HELP=0 TB_VERBOSE=0 XDG_CURRENT_DESKTOP=MATE XDG_[...] XDG_SESSION_TYPE=x11 (Filtered) environment when started through MATE-Panel: (this wants firefox.desktop as default browser) GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/firefox.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=3674365 LD_LIBRARY_PATH=/usr/lib/firefox LD_PRELOAD=libmozsandbox.so MOZ_APP_SILENT_START= MOZ_ASSUME_USER_NS=1 MOZ_CRASHREPORTER_[...] MOZ_HEADLESS=1 MOZ_LAUNCHED_CHILD= MOZ_PROFILER_STARTUP= MOZ_SANDBOXED=1 MOZ_SANDBOX_USE_CHROOT=11476395008 PATH=/home/j/.cargo/bin:/home/j/config/bin:/home/j/.local/bin:/home/j/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/sbin:/usr/sbin PWD=/home/j XDG_SESSION_DESKTOP=mate XDG_SESSION_TYPE=x11