I tried to investigate further. It seems PATH for user sessions is now set by
1. systemd-environment-d-generator based on /etc/environment and its own config
2. pam_env.so module based on /etc/environment and optionally ~/.pam_environment (overrides above?)
3. some other source where ~/.local/bin path is coming from
I can confirm it did work for some time but has regressed lately in 20.04.
The snap paths are missing from environment when login shell is /usr/bin/fish
pmart@t420 ~> systemctl show-environment --user | grep -e '^PATH' -e '^XDG_DATA' pmart/. local/bin: /usr/local/ sbin:/usr/ local/bin: /usr/sbin: /usr/bin: /sbin:/ bin:/usr/ games:/ usr/local/ games DIRS=/usr/ share/plasma: /usr/local/ share/: /usr/share/
PATH=/home/
XDG_DATA_
After changing it to /usr/bin/bash and relogging
pmart@t420:~$ systemctl show-environment --user | grep -e '^PATH' -e '^XDG_DATA' pmart/. local/bin: /usr/local/ sbin:/usr/ local/bin: /usr/sbin: /usr/bin: /sbin:/ bin:/usr/ games:/ usr/local/ games:/ snap/bin DIRS=/usr/ share/plasma: /usr/local/ share:/ usr/share: /var/lib/ snapd/desktop
PATH=/home/
XDG_DATA_
Applies to both sddm and login(1) sessions.
I tried to investigate further. It seems PATH for user sessions is now set by
1. systemd- environment- d-generator based on /etc/environment and its own config
2. pam_env.so module based on /etc/environment and optionally ~/.pam_environment (overrides above?)
3. some other source where ~/.local/bin path is coming from
Btw my /etc/environment contents are
PATH="/ usr/local/ sbin:/usr/ local/bin: /usr/sbin: /usr/bin: /sbin:/ bin:/usr/ games:/ usr/local/ games"
and I'm not sure whether I have configured it explicitly or this is the default (file is not owned by any package)