Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Nov 2002 15:04:23 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        questions@FreeBSD.ORG
Subject:   Re: Confused about bash profiles and environment settings.
Message-ID:  <20021118150423.GB30499@happy-idiot-talk.infracaninophi>
In-Reply-To: <1037630612.73684.18.camel@daemon.home>
References:  <1037630612.73684.18.camel@daemon.home>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 18, 2002 at 10:43:32PM +0800, Khairil Yusof wrote:

> So bash is getting it's path settings from somewhere else. /etc/profile
> is commented out.
> 
> Where else is it getting my path settings from (login.conf?).
> 
> I tried changing PATH in that and it doesn't affect anything.

login.conf is probably where your PATH setting originates from.  If
you modify /etc/login.conf, you will have to run

    cap_mkdb /etc/login.conf

(as noted at the top of that file) before the changes will come into
force.

/etc/login.conf is the ultimate place where such settings may be
configured.  You can override the settings from there just for your
own account by modifying ~/.login_conf, or you can override the
settings for a particular shell by modifying the appropriate rc files.
You can change settings in .xinitrc (startx) or .xsession (xdm) so
they will only take effect under X windows.  In any case, you're going
to have to log out and log back in again before your session will
reflect the changes you've made.

> However if I cut and paste this path and put it into ~/.bash_profile
> certain commands don't work, and my addition of /usr/local/jdk1.3.1/bin
> finds java, but java fails to run (complaining about missing libs).
 
> On the other hand root which is using csh, if I edit .cshrc and add the
> java path in, everything works just as expected.

~/.bash_profile or ~/.bash_login is sourced one time, at login.
~/.cshrc is sourced each time you start up a new shell.  You can use
~/.bashrc if you want the 'every new shell' behaviour under bash, and
~/.login for the 'once per login session' behaviour under csh.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
                                                      Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021118150423.GB30499>