[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Environment Variables



Maximiliano Combina wrote:
On Sun, 2005-02-27 at 13:08 -0500, Tom Allison wrote:

I'm trying to get a clear picture on how to set up the Environment Variables on my workstation.

Currently, I have something in my /etc/profile like this:

watch your /etc/bash.bashrc






Thanks for the pointer. After a bit more poking around a some time off to get a clear view...
Nothing much in bash.bashrc as you suggested, but I did find:
~/.bash_profile with rights of 644.
But nothing in here seems to have been effective in my xterm windows.

From 'man bash'
When  bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads and executes  com-
mands  from  the file /etc/profile, if that file exists.  After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in  that order, and reads and executes commands from the first one that
exists and is readable.  The --noprofile option may be  used  when  the
shell is started to inhibit this behavior.

printenv from my xterm window shows that SHELL=/bin/bash
So I should have executed these at some point...
But I didn't.

.bash_profile follows:
# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/login.defs
#umask 022

# the rest of this file is commented out.

# set variable identifying the chroot you work in
#if [ -f /etc/debian_chroot ]; then
#  debian_chroot=$(cat /etc/debian_chroot)
#fi

# include .bashrc if it exists
#if [ -f ~/.bashrc ]; then
#    . ~/.bashrc
#fi

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi

# do the same with MANPATH
#if [ -d ~/man ]; then
#    MANPATH=~/man:"${MANPATH}"
#    export MANPATH
#fi

CVSROOT="/var/lib/cvs"
export CVSROOT



Reply to: