Add $HOME/.local/bin to PATH by default
Details
- Reviewers
DataDrake - Group Reviewers
Triage Team - Commits
- R420:b707fc64652e: Add $HOME/.local/bin to PATH by default
Installed the package and verified $HOME/.local/bin in part of the PATH environment variable
Diff Detail
- Repository
- R420 bash
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
My 2 cents: I think we should do this to zsh and fish as well. What do you think?
After all, XDG specs say:
User-specific executable files may be stored in $HOME/.local/bin. Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place.
Unless a user has modified /etc/profile which would be overwritten every upgrade, or created an /etc/zprofile or /etc/zsh/zprofile for a custom config.
zsh actually sources /etc/profile https://dev.getsol.us/source/zsh/browse/master/files/zprofile$6 which means it sources /usr/share/defaults/etc/profile.d/*.sh https://dev.getsol.us/source/bash/browse/master/files/profile/profile$4
In addition, if the user is using a display manager such as lightdm, gdm, or sddm, the /etc/profile is automatically sourced when the display manager starts, and any process in the graphical user interface will inherit the PATH environment. For example, this is where lightdm sources /etc/profile: https://dev.getsol.us/source/lightdm/browse/master/files/lightdm-wrapper$8. No matter the user uses bash, zsh, or fish, he/she should have $HOME/.local/bin in the PATH environment variable after this commit if he/she uses a display manager. To be accurate, zprofile is not sourced if a display manager is used. However, the display manager is where we make sure PATH is set up correctly.