[Bug 1640514] Re: /snap/bin is not added to the PATH when using zsh
Jakub Kuczys
1640514 at bugs.launchpad.net
Sat Jul 2 21:48:07 UTC 2022
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.
** Bug watch added: github.com/sddm/sddm/issues #1276
https://github.com/sddm/sddm/issues/1276
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to zsh in Ubuntu.
https://bugs.launchpad.net/bugs/1640514
Title:
/snap/bin is not added to the PATH when using zsh
Status in Snappy:
Fix Released
Status in snapd package in Ubuntu:
Confirmed
Status in zsh package in Ubuntu:
Invalid
Status in snapd source package in Xenial:
Confirmed
Status in zsh source package in Xenial:
Invalid
Status in snapd source package in Bionic:
Fix Released
Status in zsh source package in Bionic:
Invalid
Bug description:
--- Environment ---
Ubuntu Zesty 17.04 (dev)
zsh
snapd 2.16
--- Description ---
zsh does not seem to load the scripts in /etc/profile.d/ (see https://bugzilla.redhat.com/show_bug.cgi?id=88457 ).
As a consequence, /snap/bin is not added to PATH, and running snaps from terminal (without snap run) does not work
--- How to reproduce ---
1) Install zsh
2) try running apps provided by snaps from the shell, without using snap run
To manage notifications about this bug go to:
https://bugs.launchpad.net/snappy/+bug/1640514/+subscriptions
More information about the foundations-bugs
mailing list