LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   setting paths (https://www.linuxquestions.org/questions/linux-software-2/setting-paths-111185/)

bmagyar 11-01-2003 03:52 PM

setting paths
 
Ok, so it seems like I go through this non-sense every time I want to install something new.

That's right path-setting!

I do the following:

PATH=$PATH:/new/directory/here

then append the same directory to the list of current paths in

.bash_profile (located in my home directory). I swear this worked before. But after making these changes, the paths *still*l aren't permenant. Logging in/out also did nothing.

What am I overlooking?
Thanks, everyone

neo77777 11-01-2003 03:54 PM

do you
export PATH
?

bmagyar 11-01-2003 03:58 PM

yup. I tried exectuting the following sequence of commands
with and without the line
export PATH
in between setting the path and updating bash_profile

quatsch 11-01-2003 04:13 PM

export PATH
has to be in ~/.bash_profil. Do you have it there?

bmagyar 11-01-2003 04:18 PM

yes

quatsch 11-01-2003 04:26 PM

hmm. Could you post your ~/.bash_profile? Maybe someone can see something.

tokyoeye 11-01-2003 04:32 PM

Do you maybe have any strange line in /etc/profile that overwrites the users bash files after a reboot?

Maybe a silly question but do you seperate the directories in the path in your bash_profile file by a : ?:rolleyes:

bmagyar 11-01-2003 04:40 PM

hey guys,

here's my bash_profile:




# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/opt/JBuilder9/jdk1.4/bin:/opt/OpenOffice.org1.1.0/program
:/usr/bin/MozillaFirebird/:

export PATH
unset USERNAME

quatsch 11-01-2003 04:56 PM

maybe get rid of the :/ at the end of/usr/bin/MozillaFirebird/:

Don't know if this has anything to do with the problem but might worth a shot.

bmagyar 11-01-2003 05:02 PM

No Luck.

And here is /etc/profile in response to the earlier post:




# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}

# Path manipulation
if [ `id -u` = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after

unset pathmunge

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done

unset i

quatsch 11-01-2003 06:08 PM

silly question maybe but does your ~/.bash_profile have exec permissions?

Do you actually have a /usr/bin/MozillaFirebird directory? Seems an unusual place to have the Firebird directory.


All times are GMT -5. The time now is 04:14 AM.