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

Re: $PATH problem



On 7/8/05, Chris F.A. Johnson <cfajohnson@gmail.com> wrote:
> On 2005-07-08, L.V.Gandhi wrote:
> > I have following .bash_profile.
> > lvgandhi@lvgdell600m:~$ cat .bash_profile
> > # ~/.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
> >
> > # include .bashrc if it exists
> > if [ -f ~/.bashrc ]; then
> >     . ~/.bashrc
> > fi
> >
> > # the rest of this file is commented out.
> >
> > # set PATH so it includes user's private bin if it exists
> > if [ -d ~/bin ] ; then
> >     PATH=~/bin:"${PATH}"
> > fi
> > export PATH
> >
> > # do the same with MANPATH
> > #if [ -d ~/man ]; then
> > #    MANPATH=~/man${MANPATH:-:}
> > #    export MANPATH
> > #fi
> > lvgandhi@lvgdell600m:~$
> >
> > But stille I don't get ~/bin in my path. Any help is appreciated. I am
> > running sarge with yesting and unstable in  sources.list for
> > upgrading.
> 
>    Unless it is a login shell, ~/.bash_profile is not sourced.
> 
>    Put the PATH statements in ~/.bashrc, or call bash with the -l
>    option, or xterm (or rxvt) with the -ls option.
> 
It has done the job. I have the following in /etc/profile.
if [ "`id -u`" -eq 0 ]; then
 PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:~/bin"
else
 PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:~/bin"
fi

export PATH
This also didn't help. Can I know why?

-- 
L.V.Gandhi
http://lvgandhi.tripod.com/
linux user No.205042



Reply to: