Environment overwrites XDG_DATA_DIRS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
flatpak (Ubuntu) |
Fix Released
|
Undecided
|
Andrew Hayzen | ||
Focal |
Fix Released
|
Undecided
|
Andrew Hayzen |
Bug Description
[Impact]
Flatpak gdm environment overwrites any custom configuration (eg in ~/.config/
[Test Case]
Create a local environment configuration
$ mkdir -p ~/.config/
$ echo "XDG_DATA_
Reboot and ensure you use the Wayland session. Then check your XDG_DATA_DIRS from systemctl, the issue occurs when /tmp is not set, the issue is resolved if it is set.
$ systemctl --user show-environment |grep XDG_DATA_DIRS
[Regression Potential]
Low. This only affects users using the Wayland session with a custom environment (which are both non-standard configuration).
[Original Description]
Package contains this file:
/usr/share/
With this single line content:
XDG_DATA_
This is setting the XDG_DATA_DIRS variable, irrespective of it's preexisting value.
In my system I have snapd installed and I have a local configuration for that variable under .config/
----
1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
Description: Ubuntu 18.10
Release: 18.10
2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
flatpak:
Installed: 1.0.4-1
Candidate: 1.0.4-1
Version table:
*** 1.0.4-1 500
500 http://
100 /var/lib/
3) What you expected to happen
To have XDG_DATA_DIRS variable populated with the package's value as well as my own.
4) What happened instead
Only the configuration from flatpak's package survived.
ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: flatpak 1.0.4-1
ProcVersionSign
Uname: Linux 4.18.0-10-generic x86_64
ApportVersion: 2.20.10-0ubuntu13
Architecture: amd64
CurrentDesktop: GNOME
Date: Tue Nov 6 00:55:32 2018
InstallationDate: Installed on 2018-05-16 (173 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
SourcePackage: flatpak
UpgradeStatus: Upgraded to cosmic on 2018-10-18 (18 days ago)
description: | updated |
Changed in flatpak (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in flatpak (Ubuntu Focal): | |
status: | New → In Progress |
assignee: | nobody → Andrew Hayzen (ahayzen) |
Changed in flatpak (Ubuntu Bionic): | |
status: | New → Confirmed |
no longer affects: | flatpak (Ubuntu Bionic) |
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-environmen t-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.freedeskto p.org/software/ systemd/ man/environment .d.html /wiki.gnome. org/Initiatives /Wayland/ SessionStart# Environment_ variables /github. com/flatpak/ flatpak/ blob/master/ env.d/flatpak. env.in /github. com/flatpak/ flatpak/ issues
1 - https:/
2 - https:/
3 - https:/