Comment 2 for bug 1801814

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

The .config/environment.d docs [0] and some info around gdm/env.d [1] don't seem to be too clear which order they would be loaded. But I would expect that the system gdm is loaded first then the local user one. So it seems strange that your local environment.d doesn't override.

The flatpak.env file is located here [2] upstream, I would report a bug upstream [3] as they may have more ideas as to how to resolve this issue. Also providing your local configuration file in .config/environment.d may be useful.

Testing this myself, if i run "/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator" it shows the correct override of XDG_DATA_DIRS, but "systemctl --user show-environment" doesn't show XDG_DATA_DIRS being overridden - however it does show additional env vars.

So it could be something odd happening in systemd ? I'm unsure if this is specifically a flatpak bug yet, lets see what upstream and others say.

0 - https://www.freedesktop.org/software/systemd/man/environment.d.html
1 - https://wiki.gnome.org/Initiatives/Wayland/SessionStart#Environment_variables
2 - https://github.com/flatpak/flatpak/blob/master/env.d/flatpak.env.in
3 - https://github.com/flatpak/flatpak/issues