Description of problem:
Apparently RHEL does not respect the systemd specification which documents clearly the ~/.local/bin it is part of PATH.
Steps to Reproduce:
1. set |grep PATH
Note that this feature is not specific to destop usage and respecting it essential for many tools to work correctly.
For example when using pip to install modules at user level the executables will be installed inside ~/.local/bin, and because RHEL does not add them to path scripts running them would get broken.
This PATH is supposed to be appended at the start of the PATH list, not at the end, allowing users to override default tool to be used with the ones installed by themselves.
Example: user wanting to use newer version of virtualenv, tox, pip, which is not available/provided by the operating system.
It should be set by ~/.bash_profile on rhel 7. This is the default bash_profile:
$ cat ~/.bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
# User specific environment and startup programs
Either you have modified ~/.bash_profile on your system or you are overriding PATH after ~/.bash_profile is sourced.
It was my mistake as I used su to change user and I forgot to use `-l` to specify the login. In that case the PATH is not updated and it does use the default, which does not include it.
One thing that I observed is that the user bin path is added to the end of the list and this could be problematic because if users installs his own tool, that tool will never be used as long there is one installed at system level.
I am not sure if the spec(s) do mention the precedence order of the PATHs as my impression is that user one should take precedence, allowing user-override.
> One thing that I observed is that the user bin path is added to the end of the list and this could be problematic because if users installs his own tool, that tool will never be used as long there is one installed at system level.
It is already being discussed in fedora-devel.
Thanks for posting the link to Fedora discussion. Apparently the discussion took place about 3 weeks ago and didn't get any clear outcomes.
A small summary:
- Debian/Ubuntu now adds that to the top of the PATH, as expected.
- security concerns are irrelevant because any user can already alter PATH or create files on his own home directory.
*** Bug 1093432 has been marked as a duplicate of this bug. ***