bash_profile question

ZIYAD A. M. AL-BATLY zamb at spymac.com
Thu Apr 7 04:54:40 UTC 2005


On Wed, 2005-04-06 at 19:51 -0400, Paul Pianta wrote:
> Sorry for the delay ...
No problem.

> Thanks for the response but I am not sure I get it.
You're welcome, and I think I didn't get what you're actually asking in
the first post. (I was thinking you didn't understand the difference
between ~/.bashrc and ~/.bash_profile.)

> If what you are saying is true - then this piece of code ... 
> 
> if [ -d ~/bin ] ; then
>     PATH=~/bin:"${PATH}"
> fi
> 
> should actually be in my ~/.bashrc - not in my ~/.bash_profile.
No. As I said above, I was answering another question. (My bad, sorry.)

> If this is the case - then it is an ubuntu bug because the above code is
> in the default .bash_profile that is standard when I installed Hoary
> preview.
I think it's a bug from Ubuntu. If you want to add ~/bin to the PATH
then just add it in /etc/profile for all users (bash will ignore any
missing directory(s) in it's PATH variable).

> It would be great if other people could check and prove me wrong and let
> me know that their .bash_profile is different.
No, your's is O.K. just like mine (actually, I'm using my own startup
files, but the files found in /etc/skel are just like your's).

> So the way I see it is - there is currently some code in .bash_profile
> that is there for a good reason (ie. users own 'bin' dir) - but the code
> is useless because it is in the wrong file.
No, as I said above: I was wrong (I didn't understand what you actually
asking).

> right or wrong?
> 
> pantz
You are right in your original point! Why include ~/bin as part of the
PATH only for those who login from the console and not when starting a
new terminal?.

(Again: sorry for not understanding what you was asking.)
(For the List: sorry for the previous duplicate post.)
Ziyad.





More information about the ubuntu-users mailing list