Adding to my PATH on system startup

Help with the version of MX KDE officially released by the Development Team.
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
slayd
Posts: 10
Joined: Sun Sep 18, 2022 5:25 pm

Adding to my PATH on system startup

#1 Post 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?

User avatar
dolphin_oracle
Developer
Posts: 22445
Joined: Sun Dec 16, 2007 12:17 pm

Re: Adding to my PATH on system startup

#2 Post by dolphin_oracle »

I think it gets overwritten by .bashrc. modify your path there.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

User avatar
fehlix
Developer
Posts: 12767
Joined: Wed Apr 11, 2018 5:09 pm

Re: Adding to my PATH on system startup

#3 Post 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:
wiki.debian.org/EnvironmentVariables wrote:Graphical logins do not read a shell's startup files (/etc/profile and ~/.profile and so on) by default
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.

slayd
Posts: 10
Joined: Sun Sep 18, 2022 5:25 pm

Re: Adding to my PATH on system startup

#4 Post 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!

User avatar
fehlix
Developer
Posts: 12767
Joined: Wed Apr 11, 2018 5:09 pm

Re: Adding to my PATH on system startup

#5 Post 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.

slayd
Posts: 10
Joined: Sun Sep 18, 2022 5:25 pm

Re: Adding to my PATH on system startup

#6 Post by slayd »

Ah. That makes sense.

I solved the problem by sourcing .profile from .zshrc

Post Reply

Return to “MX KDE Official Release”