You are not logged in.
With today's move to symlinked /usr, /sbin, and /usr/sbin directories, the default PATH is /etc/profile has been dramatically shortened to acommodate this universal location for binaries. So I just happened to "which" something today, and I found that my $PATH was set to:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:...
But when if I open a tty and log in, my path is normal (meaning without the /usr/sbin). Also, if I start my graphical interface with "startx" the PATH is normal as well.
I am curious if this is true for other users of user-session@.service (or even other users of "systemd --user") in general. Or is it something wonky with my configs? I have been searching through everything I can think of that might modify my PATH variable when I log in, and I can't seem to find anything. I searched all over the place, but the fact that it is isolated to only when I use user-sessions@.service should mean that it would be only in a very few places. But I am fairly certain I have checked all those possible places.
Can anyone else who makes user of systemd --user take a quick peek for me and see if their machine is set the same way? I would greatly appreciate it.
Update: It turns out that this is a hard coded variable in systemd. See 65kid's post below for more info.
Last edited by WonderWoofy (2013-06-03 15:56:05)
Offline
I imagine this is because you haven't updated your Environment=PATH variable in your windowmanager user service. In fact, were I prone to gambling, I would likely bet on it.
All the best,
-HG
Offline
I checked this. The part where i mentioned that because it only happens in the user-session@.service lead me to check all of my unit files in ~/.config/systemd/user/ as well as /lib/systemd/user and /etc/systemd/user (the last one actually has nothing in it).
I appreciate the answer HalosGhost, but it would seem you would have lost that bet had you ben prone to gambling My i3.service doesn't even have an Evnironment=PATH in it... that is all set when I open a terminal and /etc/zsh/profile sources /etc/profile. So if it is doing that (which I have it set to do), I wouldn't be all that confused if /usr/sbin came after the normal PATH. But it is wedged in between /usr/local/sbin and /usr/bin... how the f* did it get there?!
BTW, HalosGhost, do you actually use the user-session@.service? If so did you actually check your PATH? I would actually really like to know if it is just me, and I should keep searching, or if it is something that is inherent to systemd --user, or even the way user-session@.service starts itself.
Offline
I'm glad I didn't bet then
I do use systemd --user to manage X, but I'm not running [testing] so my PATH isn't really relevant. I am sorry that I cannot offer more help.
All the best,
-HG
Offline
Its all good. That is why I put it in the [testing] section... I'm hoping that there is someone out there that can give me some insight into which direction I should start debugging. Right now, two totally different directions seems way too scatter brained... even for me.
Offline
if you use a systemd user session, /etc/profile isn't parsed by anything, systemd sets PATH itself.
Offline
if you use a systemd user session, /etc/profile isn't parsed by anything, systemd sets PATH itself.
Okay maybe I won't have to try to find where this is coming from. Thanks 65kid. This is solved.
Offline
If there is anyone insterested, I have taken further steps in this "issue" (it is not really an issue since it works with or without /usr/sbin included in the PATH variable).
I modified the source and rebuilt, and no ill effects have come of it. Though I didn't expect anything wrong to occur, as my $PATH now matches what is set by /etc/profile.
But I also submitted a flyspray to our bug tracker. I chose to do it there because I feel that until this /usr move becomes the rule rather than the exception, having the PATH default to include /usr/sbin is indeed very sane. So for the time being it is actually an Arch Linux specific case.
Offline