I have come to believe this is not a bug.

It may be that environment.d is very nice for systemd integration, but it is not very granular. Any environment entered via that route will end up in systemd user environments possibly even when it was not intended.

Scripts in Xsession.d on the other hand may well write over environment variables but they are written in generic shell scripts and so can be tailored to only set environment variables in specific circumstances. I would guess (and I am guessing here) that environment.d gets processed before Xsession.d, and so scripts in Xsession.d could choose not override environment variables that have already been set if appropriate.

Reply via email to