Red Hat Bugzilla – Bug 3626
Misleading comments in sample bash_profile and bashrc
Last modified: 2008-05-01 11:37:50 EDT
The /etc files for bash profile and bashrc have comments at the top which suggest that all environment variables should go in the bash_profile, not the bashrc. If you find a variable that needs setting (I had to set COLORFGBG for something) and put it in .bash_profile, it won't get picked up by any new bash you spawn unless you specifically say it should be a login shell or tell it to source the profile. This means that any gnome-terminals or xterminals you start don't pick it up. Presumably the answer is to put the variable into the profile, yes, but the comments on the profile say they should go in the rc. Trivial, yes, but trivial to fix, at least :)
I'm a twit and sending you rubbish. Switch profile and rc in the penultimate sentence starting "presumably the answer..", and colour me embarrassed. I intended to say that as variables you want to be picked up should go in bashrc not profile, the comments in the two sample files implying variables live in profile should be updated. Apologies. I did proof-read before sending; I just didn't do it very well. Now I just hope this gets added to bug 3626 and not made into a new one.
This issue has been forwarded to a developer for further review.
The comments are correct as far as I can tell. The treatment of the
dot files in user home directories is different (and somewhat
documented in the bach info pages)