All,
I'm using xrdp to connect to a Centos 7 box. I notice that my PATH environment variable is different depending on whether I RDP in or SSH and I can't for the life of me figure out where that's happening.
I've checked /etc/xrdp/startwm.sh but all the PATH related code is already commented out. My /etc/profile is fairly standard and there's nothing in /etc/profile.d that would be doing this. Besides, if it were somewhere in /etc/profile[.d] then that would be applied even during SSH logins.
I've seen this mentioned a few times in various places on the Internets with no real solution or explanation.
Anyone have an explanation and can point me in the right direction?
Kind of driving me crazy not knowing where this is happening!
EDIT:
I should have been more clear. It's the RDP scenario that I am having trouble figuring out. I can pretty much explain all the PATH related shenanigans I see during an SSH session (or even during a VNC session, mostly anyway). If I look through the /etc/profile* settings as well as my own ~/.bash_profile, things make sense during an SSH session. But when I RDP in, things get weird.
In addition to /etc/xrdp/startwm.sh, I checked /etc/security/pam_env.conf in which everything was already commented out.
EDIT 2:
In an SSH/normal login session, my path looks like:
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
In an RDP session, my PATH looks like:
/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin
I can see in /etc/profile where /usr/local/sbin and /usr/sbin are being appended (or prepended if root).
In the RDP case, there are a couple additions as well as things being rearranged. For example, /bin is all of a sudden present, as well as /usr/XllR6/bin. Also, /usr/bin is now before /usr/local/bin. It's mostly this last part that I don't want.
I know I could fix it up in my own ~/.bash_profile, but I don't see why I should have to. Don't see why the path is being messed with to that degree in the first place.
Thanks, Justin