Re: X-Windows and Bash Settings
On Mon, 20 Oct 1997, Jason Bauer wrote:
> I've got Debian Linux 1.3 using bash for a shell. When I go into X-Windows
> (Afterstep win. manager) I lose all of my aliases and other settings that
Do you mean these settings don't work if you (for example) start up an
xterm with bash in it?
> get run in my .bash-profile when I login
That's the problem. .bash-profile is run *only* for login shells -- when
you start an xterm, you're not logging in again, so bash doesn't read
.bash-profile. You've got a pair of bash settings files: .bashrc (run for
non-login shells, like xterms) and .bash_profile (run only for login
shells). This is so you can do things like set terminals up and check for
mail only when you login -- don't need to do this otherwise.
The simplest soluction is to put all the login-specific stuff in
.bash_profile, and put all your aliases and other setups in .bashrc.
Then make the last line of .bash_profile be "source .bashrc" -- so that
stuff gets loaded even in login shells.
An alternative would be to start all bash shells as login shells by doing
"bash --login" every time you want to start a shell. That works ok, but
is kinda silly.
> and when i quit X the settings are
> back to how they should be.
That's because X is running in the bash shell that started when you
logged in -- when X exits, you're back to that same shell process.
Will
harpo@udel.edu
lowe@cis.udel.edu
http://www.cis.udel.edu/~lowe/
*****************************************************************************
Good Idea: Feeding Stray Cats in the Park.
Bad Idea: Feeding Stray Cats in the park ... to a bear.
*****************************************************************************
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: