The systemd way of inject environment does not fully address the problem. Simple `su -l <user> <command>` where the <user>'s shell is zsh is enough to demonstrate this. AFAICT this is also a problem with some desktop environments (non GNOME, or KDE), where the DE environment isn't updated for some reason.
From what I can tell, Fedora imports respective files from /etc/profile.d using ksh emulation. Arch imports the whole /etc/profile using sh emulation. Perhaps it's worth reconsidering.
The systemd way of inject environment does not fully address the problem. Simple `su -l <user> <command>` where the <user>'s shell is zsh is enough to demonstrate this. AFAICT this is also a problem with some desktop environments (non GNOME, or KDE), where the DE environment isn't updated for some reason.
From what I can tell, Fedora imports respective files from /etc/profile.d using ksh emulation. Arch imports the whole /etc/profile using sh emulation. Perhaps it's worth reconsidering.