Page 1 of 1
Adding to my PATH on system startup
Posted: Wed Apr 26, 2023 4:06 pm
by slayd
I've installed the latest KDE version of MX Linux.
I note that the .profile file in my home directory has two checks already set for adding ~/.local/bin and ~/bin to the PATH.
After reboot, echo $PATH does not show the updated PATH. I created ~/.local/bin and ~/bin so the exist checks should work.
If I souce .profile, the new entries show up.
Why isn't the PATH updated on reboot?
Re: Adding to my PATH on system startup
Posted: Wed Apr 26, 2023 4:08 pm
by dolphin_oracle
I think it gets overwritten by .bashrc. modify your path there.
Re: Adding to my PATH on system startup
Posted: Wed Apr 26, 2023 4:28 pm
by fehlix
slayd wrote: Wed Apr 26, 2023 4:06 pm
Why isn't the PATH updated on reboot?
In short, quoting Debian's wiki:
They describe some ways of adjustments. Make sure when using .bashrc, it's made such that the PATH is not added, when it's already included.
Re: Adding to my PATH on system startup
Posted: Wed Apr 26, 2023 7:30 pm
by slayd
I see. Didn't know that as most of my past experience was on Arch based distros. Although I wonder why the MX install puts those additions in .profile on a clean install.
Thank you!
Re: Adding to my PATH on system startup
Posted: Wed Apr 26, 2023 8:46 pm
by fehlix
slayd wrote: Wed Apr 26, 2023 7:30 pm
I see. Didn't know that as most of my past experience was on Arch based distros. Although I wonder why the MX install puts those additions in .profile on a clean install.
To allow setup environment for users who prefer to boot into the console instead of X-gui - see wiki link.
Re: Adding to my PATH on system startup
Posted: Thu Apr 27, 2023 9:46 am
by slayd
Ah. That makes sense.
I solved the problem by sourcing .profile from .zshrc