I've found out that `/etc/environment.d` is not intended for setting
environment variables for login shells. From poettering at
https://github.com/systemd/systemd/issues/12938:

    @dschepler is right. systemd-environment-d-generator gets run by
systemd --user, and thus set environment variables for the systemd per-
user service manager and their child processes only. Login shells (such
as those started via getty on the console or ssh) are not children of
systemd and hence the generators have no effect on them whatsoever.

    For login sessions use pam_env or some .profile script or similar to
set env vars... Sorry.

** Bug watch added: github.com/systemd/systemd/issues #12938
   https://github.com/systemd/systemd/issues/12938

** Changed in: systemd (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861363

Title:
  /etc/environment.d cannot be used to add to PATH

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1861363/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to