This is still a problem on Ubuntu 22.04 (jammy). I'm experiencing this problem on Kubuntu 22.04 with the standard KDE + SDDM but I did not experience this issue when I installed (on that same Kubuntu) GNOME and switched my display manager to GDM3 while installing it. It seems that KDE + GDM3 also works while GNOME + SDDM does not.
It appears that SDDM doesn't currently import user session environment from systemd: https://github.com/sddm/sddm/issues/1276
PATH gets properly imported because snap uses a system environment generator (systemd.environment-generator). However, this environment generator only updates PATH, not XDG_DATA_DIRS. I'm not sure if system environment generator should alter XDG_DATA_DIRS (from my testing it seems that flatpak updates XDG_DATA_DIRS using both system and user environment generator) but snap could definitely use a user environment generator to do that.
The necessary code is pretty much already there because snap does have a system environment generator and user environment generator works in the exact same way. There might be some special handling needed for XDG_DATA_DIRS (since the environment.d/990-snapd.conf does `${XDG_DATA_DIRS:-/usr/local/share:/usr/share}` rather than just `$XDG_DATA_DIRS`) specifically but I imagine it probably wouldn't be too complicated.
This is still a problem on Ubuntu 22.04 (jammy). I'm experiencing this problem on Kubuntu 22.04 with the standard KDE + SDDM but I did not experience this issue when I installed (on that same Kubuntu) GNOME and switched my display manager to GDM3 while installing it. It seems that KDE + GDM3 also works while GNOME + SDDM does not. /github. com/sddm/ sddm/issues/ 1276
It appears that SDDM doesn't currently import user session environment from systemd: https:/
PATH gets properly imported because snap uses a system environment generator (systemd. environment- generator) . However, this environment generator only updates PATH, not XDG_DATA_DIRS. I'm not sure if system environment generator should alter XDG_DATA_DIRS (from my testing it seems that flatpak updates XDG_DATA_DIRS using both system and user environment generator) but snap could definitely use a user environment generator to do that.
The necessary code is pretty much already there because snap does have a system environment generator and user environment generator works in the exact same way. There might be some special handling needed for XDG_DATA_DIRS (since the environment. d/990-snapd. conf does `${XDG_ DATA_DIRS: -/usr/local/ share:/ usr/share} ` rather than just `$XDG_DATA_DIRS`) specifically but I imagine it probably wouldn't be too complicated.
Edit: also not an issue with LightDM