You are not logged in.
This is on a fresh install, and I use xdm-archlinux.
My $PATH is populated with the following on starting a session via XDM:
/bin:/usr/bin:/usr/bin:/usr/ucb:/usr/local/sbin:/usr/local/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
The first bit, up to /usr/ucb, is inserted by xdm, and the rest by /etc/profile*—which carefully adds its stuff towards the end of $PATH to not override previous directories.
As a result, /usr/bin programs have precedence over /usr/local/bin ones.
Is this a bug?
Offline
This would happen because xdm sets a PATH and the way /etc/profile acts, it'll not add duplicates and append stuff.
If you run "PATH= /usr/bin/bash -l" you should get a proper PATH again.
"man xdm" reveals that this can be impacted by "DisplayManager.DISPLAY.userPath" (also see systemPath) in the resource - you could file a bug to xdm-archlinux to clear the path.
Offline
Thanks seth!
Now, whose fault is it, really? XDM, xdm-archlinux, or filesystem (that owns /etc/profile)? I'd gladly report a bug, but not sure for which package.
Surely, even if you don't install xdm-archlinux (which is supposed to be a cosmetic package), you can expect the default install of xdm to not screw up PATH in that way, so I'd be inclined to think that /etc/profile ought to be changed.
In the meantime, my .xsession now starts by sanitizing $PATH and putting /usr/bin and /bin at the end. Thoughts?
Last edited by cadilhac (2019-09-20 16:45:40)
Offline
Now, who's fault is it, really?
The answer to that question is always "yours" :-P
The behaviors of xdm and /etc/profile are both (unaware of each other) reasonable enough, but they collide.
The interface is archlinux, but as you pointed out, rather the xorg-xdm package (since the other one is just to prove that xdm does not *have* to be ugly)
Changing /etc/profile would have far more widespread consequnces and it doesn't know that the environment is "pre-polluted", notably it cannot determine whether the "pollution" is intentional or actual pollution.
Offline
Fair point, one taken. However, I'm not "just" installing xdm, I'm installing the archlinux-packaged version of it, so I should reasonably expect that the glue is there to make them work in symbiosis. My hunch is that xorg-xdm should be packaged in such a way that the default userPath/systemPath is unpolluted. If you agree, I can go ahead a fill a bug report to xorg-xdm (and potentially xdm-archlinux, depending on how the default is implemented).
Offline
Though you don't need my agreement at all, that's pretty much the position I tried to convey in post #4, yes.
I'd say that a solution in xorg-xdm would be preferable, defining DEF_SYSTEM_PATH resp. rather DEF_USER_PATH (which would be your case and systemPath might be required depending on how the xdm setup scripts are executed) for the compiler should do.
Offline
Ahah, well, I'd rather follow the advice of someone with experience. Alright, all set: https://bugs.archlinux.org/task/63867
Thanks!
Offline