Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Mar 1997 18:19:41 -0800
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        Jason Wells <jcwells@u.washington.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Terminals and environments 
Message-ID:  <18800.857269181@time.cdrom.com>
In-Reply-To: Your message of "Sat, 01 Mar 1997 15:59:01 PST." <3318C2C5.685C@u.washington.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
> This tends to be two questions in one. I gather that they are closely
> related, therefore they both appear in one posting.

bash's startup behavior is as follows:

	1. If the shell is a login shell, .bash_profile or (if that doesn't
	   exist) .profile is read.

	2. If the shell is not a login shell, .bashrc (if it exists) is
	   read.

For that reason, you want to set up your environment in one of
the following ways:

	1. If you wish to preserve login shell behavior for all xterms,
	   simply run them with the -ls option.  This won't help in all
	   shell startup situations, but it will fix your desktop.

	2. Have your .bash_profile include your .bashrc explicitly and
	   put all your aliases and stuff in the .bashrc.

#2 is the approach I use, and the only thing in my .bash_profile is
this:

	# Do login-shell specific things, like change tty settings, here
	# ...
	#
	. $HOME/.bashrc

					Jordan



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