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

bash login script problems...



I am having two problems with bash login scripts, which I cannot seem to sort 
out. Probably something simple, but I'm missing it.

1. First, here is a few lines from my .bash_profile. These lines were 
commented out by default, and I have uncommented them. 

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

I have verified, by adding some echo statements, that the body of the if 
clause IS being executed when I issue './.bash_profile' and so my ~/bin dir 
should be getting added to my path. However, after the script completes, 
'echo $PATH' does NOT show any change to my path shell variable.

What am I missing here?

2. I previously used Mandrake, and just switched to debian. Under KDE, when I 
run a standard console shell (eg the standard KDE xterm), when I used 
mandrake it appeared that .bash_profile was automatically executed, and the 
suppled mandrake version then executed .bashrc for me. It appears that under 
Debian, however, .bashrc is executed directly and .bash_profile is only 
executed when I login directly on a ptty, rather than from an xterm under KDE.

Is my understanding correct? Is there any easy way to ensure that both 
scripts are executed regardless of the method of logging in and where I log 
in to (eg Mandrake or Debian)? The reason this matters, btw, is that my old 
Mandrake computer is now my file server, and the Debian system mounts my home 
directory as an NFS share, so logins to either system (and distro) now share 
the same files. As a result, when is SSH from teh debian system to the 
mandrake, I DON'T get my correct login scripts running, and I need a 
(relatively) simply way of having the same prompt format, aliases, etc 
regardless of whether I am workign on the Debian system or remotely on the 
(Mandrake) file server.

Thanks for any help.

Neal


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: