Bug 259356 Comment 180 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

>I think we can support the MOZ_HOME dir at least.

I'm not sure what this gains you over comment 162. If you add another directory config option, every dependency and the Firefox code itself now has to do a 3-way fallback, i.e. default to ```MOZ_HOME```, then look in ```XDG_CONFIG_HOME```, then look for ```~/.mozilla```. This will be fun with writing testcases :-) Adding ```MOZ_XDG_BASE_DIR_SUPPORT=false``` that disables the new support in Firefox only needs to do something at profile creation time (and add 2-way fallback everywhere else, still no fun but strictly easier and less error prone). If I check the patch that's attached to this bug, it **already has** a ```MOZ_LEGACY_HOME``` toggle, so the "env var toggle" solution was already coded, just with a different name/default value.

Practically speaking, I'm a bit wary of adding XDG support, and shipping it to release while NOT enabling it by default. If we don't default it, anyone running with the new setting is essentially running an untested configuration. Given that the dependencies include crash reporting, you're not only in an untested config, you're in one that might never get fixed. If we flip it by default, any new profile will have it, so it'll get lots of testing, and any existing user will be on the old code, so that will remain well tested too.

Summarizing, what I think needs to happen is:
a) Patches for the dependencies to support XDG_CONFIG_HOME + .mozilla fallback (note some of these are outside of Mozilla)
b) Rebase the current patch 
c) Test the current patch on our CI and testsuites, and fix all the breakage (this could mean fixing more Mozilla tooling we missed in (a))
d) Pick a period where someone with deep Linux expertise isn't buried in Snap/Flatpack/Wayland regressions (in case you wondered why this stalled the last ~3 years)
e) Land the patches in Nightly, enabling XDG support by default (or don't enable by default, but lock it to Nightly then)
f) Watch our CI, Bugzilla and various other Linux forums for additional breakage in 3rd party tooling and assist/evangelize as much as possible
>I think we can support the MOZ_HOME dir at least.

I'm not sure what this gains you over comment 162. If you add another directory config option, every dependency and the Firefox code itself now has to do a 3-way fallback, i.e. default to ```MOZ_HOME```, then look in ```XDG_CONFIG_HOME```, then look for ```~/.mozilla```. This will be fun with writing testcases :-) Adding ```MOZ_XDG_BASE_DIR_SUPPORT=false``` that disables the new support in Firefox only needs to do something at profile creation time (and add 2-way fallback everywhere else, still no fun but strictly easier and less error prone). If I check the patch that's attached to this bug, it **already has** a ```MOZ_LEGACY_HOME``` toggle, so the "env var toggle" solution was already coded, just with a different name/default value.

Practically speaking, I'm a bit wary of adding XDG support, and shipping it to release while NOT enabling it by default. If we don't default it, anyone running with the new setting is essentially running an untested configuration. Given that the dependencies include crash reporting, you're not only in an untested config, you're in one that might never get fixed. If we flip it by default, any new profile will have it, so it'll get lots of testing, and any existing user will be on the old code, so that will remain well tested too. So the current patch is just fine from that perspective.

Summarizing, what I think needs to happen is:
a) Patches for the dependencies to support XDG_CONFIG_HOME + .mozilla fallback (note some of these are outside of Mozilla)
b) Rebase the current patch 
c) Test the current patch on our CI and testsuites, and fix all the breakage (this could mean fixing more Mozilla tooling we missed in (a))
d) Pick a period where someone with deep Linux expertise isn't buried in Snap/Flatpack/Wayland regressions (in case you wondered why this stalled the last ~3 years)
e) Land the patches in Nightly, enabling XDG support by default (or don't enable by default, but lock it to Nightly then)
f) Watch our CI, Bugzilla and various other Linux forums for additional breakage in 3rd party tooling and assist/evangelize as much as possible

Back to Bug 259356 Comment 180