3 ms·
systemd has `/etc/environment.d/`[1], which can be used to set/update `PATH`. Support for getting that into a users session isn't very wide (currently GDM and K
by IsDanielB 2y ago
systemd has `/etc/environment.d/`[1], which can be used to set/update `PATH`. Support for getting that into a users session isn't very wide (currently GDM and KDE plasma only[2]), but hopefully will be in the future.
[1]: https://www.freedesktop.org/software/systemd/man/latest/environment.d.html https://www.freedesktop.org/software/systemd/man/latest/envi...
[2]: https://wiki.archlinux.org/title/Environment_variables#Per_Wayland_session https://wiki.archlinux.org/title/Environment_variables#Per_W...
- o11c 2y agoThere are a couple of problems with environment.d - it cannot be made idempotent, and can't splice into the middle. These shouldn't be a problem since it runs early enough and should be controlled by a single sane party, but makes porting a pain. I don't understand what problem your [2] link is referring to, since the whole point of systemd user sessions is that it happens before graphical stuff.