From owner-freebsd-questions Mon Nov 18 7: 4:36 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 871B937B401 for ; Mon, 18 Nov 2002 07:04:34 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73F0543E42 for ; Mon, 18 Nov 2002 07:04:33 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id gAIF4Sx2030819 for ; Mon, 18 Nov 2002 15:04:28 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id gAIF4N1d030818 for questions@FreeBSD.ORG; Mon, 18 Nov 2002 15:04:23 GMT Date: Mon, 18 Nov 2002 15:04:23 +0000 From: Matthew Seaman To: questions@FreeBSD.ORG Subject: Re: Confused about bash profiles and environment settings. Message-ID: <20021118150423.GB30499@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , questions@FreeBSD.ORG References: <1037630612.73684.18.camel@daemon.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1037630612.73684.18.camel@daemon.home> User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-2.7 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_03_05, USER_AGENT,USER_AGENT_MUTT version=2.43 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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