[X-Unix] Altering .bashrc in bash to add to $PATH

Doug McNutt douglist at macnauchtan.com
Thu Jan 8 07:11:46 PST 2004


At 22:05 -0800 1/7/04, Robert Ameeti wrote:
>echo $SHELL gives me /bin/bash
>echo $PATH gives me /bin:/sbin:/usr/bin:/usr/sbin

I'm a tcsh kind of guy but I have had similar problems.

A solution is to create a directory $HOME/.MacOSX/ and place a file there named environment.plist.

The file gets formatted as XML and can define your full path for everything in your login session to OS neXt. It is honored by pretty much anything you do - BBEdit worksheets, AppleScript, Execute Text service. Terminal though is likely to overwrite the PATH if if it's allowed to source login files from /etc/.

There is an Apple tech note on preparation of environment.plist.

I have also found it helpful to add an echo or two to $HOME/.tcshrc (er - .bashrc) with output directed to a log file. You can learn a lot by seeing just how often and when it gets executed. Print out the $SHLVL variable as well as $PATH.

-- 
-->  There are 10 kinds of people:  those who understand binary, and those who don't <--



More information about the X-Unix mailing list