It would probably be best to leave /etc/profile as it is. I expected my wayland desktop session to have its PATH match the /etc/profile PATH for non-root shells, so I guess libpam-modules is the package I was looking for.
On Wed, May 8, 2024 at 6:14 AM Sam Hartman <hartm...@debian.org> wrote: > I'd be happy to pick up the Ubuntu patch to include PATH in > /etc/environment for libpam-modules. I have been testing the following changes locally. It is a variation based on Ubuntu's libpam-modules.postinst. *** Debian_salsa/pam/debian/libpam-modules.postinst 2025-02-11 10:13:55.525742196 -0800 --- Debian_salsa_modified/pam/debian/libpam-modules.postinst 2025-02-11 10:29:26.369651525 -0800 *************** *** 16,19 **** --- 16,29 ---- touch "$DPKG_ROOT"/etc/environment fi + # Add PATH to /etc/environment if it's not present there or in + # /etc/security/pam_env.conf + if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt 1.7.0-4; then + if ! grep -qs ^PATH "$DPKG_ROOT"/etc/security/pam_env.conf; then + if ! grep -qs ^PATH= "$DPKG_ROOT"/etc/environment; then + echo 'PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"' >> "$DPKG_ROOT"/etc/environment + fi + fi + fi + #DEBHELPER#