Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok, this is is really bugging me. I am trying to set the PATH variable on my Mandrake 9.1 system, and I have looked in all the standard places to do this:
/etc/profile
/home/<me>/.bash_profile
But neither seems to be the "master" setting of the PATH variable...
I would like to get rid of the double "//" and the double "::" in the path because it annoys me, and I also want better control over the PATH for adding directories etc...
Which accounts for the ":/home/joe/bin:/usr/java/j2sdk1.4.1_05/bin" portion of the PATH, but that still leaves the "/usr//bin:/bin:/usr/bin::/usr/local/bin" portion unaccounted for.
I have found on Google groups discussions of this where they say to check in /etc/rc.sysinit, so I did, ini there I have:
# Set the path
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH
Which doesn't seem to match at all what is actually in the PATH, it looks like this is the first place where the PATH is being set (i.e. there's no "$PATH" reference in the assignment), but if that were true, how come, some of it is then later deleted??? Also stuff seems to be being added in front of the PATH, which while possible, seems to go against most good coding practices...
Also, some other postings suggest running the following command:
find /etc -type f -exec grep -H 'PATH' {} \;
Which returns a whole lot of files, but the following looked promising:
However, /etc/profile.d/msec.csh and /etc/csh.login seem to be C Shell srcipts and I am using Bash... /etc/profile.d/msec.sh only contains the following:
if [ -n "$SECURE_LEVEL" ]; then
if [ "$SECURE_LEVEL" -le 1 ] && ! echo ${PATH} | fgrep -q :.; then
export PATH=$PATH:.
fi
fi
Which doesn't seem very helpful...
Does anyone know where the original PATH variable is set in Mandrake Linux???
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.