#942131 gnome-session: Setting PATH with environment.d does not work (in GNOME Wayland session)

Package:
gdm3
Source:
gdm3
Description:
GNOME Display Manager
Submitter:
Andreas Kloeckner
Date:
2021-05-29 11:18:04 UTC
Severity:
normal
Tags:
#942131#5
Date:
2019-10-10 17:48:22 UTC
From:
To:
Dear Maintainer,

I am having issues that seem quite related to
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869144
and the discussion there, however the conclusions reached there
don't seem to apply for me.

My `~/.config/environment.d/90-my.conf`:
```
PATH=$HOME/bin:$PATH
MOZ_USE_XINPUT2=1
```
And `systemctl --user show-environment  | egrep 'PATH|MOZ'` gives me:
```
PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
MOZ_USE_XINPUT2=1
```
i.e. the modification of `$MOZ_USE_XINPUT2` stuck, but *something* got
in the way of changing the `$PATH`. My shell is zsh, and I observed that

- Commenting out the 'run this with a login shell' chunk of
  /usr/bin/gnome-session [1] has no effect.

  [1] https://gitlab.gnome.org/GNOME/gnome-session/blob/60e619b8a2cacc7b844fe6f0e206c895de68f890/gnome-session/gnome-session.in#L3-14

- Adding things to my .profile (with the relevant chunk of
  /usr/bin/gnome-session in place) also has no effect.

The environment.d generators seem to be picking up on my conf file in an
appropriate manner:

$ export PATH=yoink
$ /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator
PATH=/home/andreas/bin:yoink
MOZ_USE_XINPUT2=1
GTK_MODULES=gail:atk-bridge:gail:atk-bridge
QT_ACCESSIBILITY=1

I would be grateful for any advice in figuring out why my PATH changes
don't make it to my GNOME session.

Thanks!
Andreas