LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 10-19-2005, 11:25 PM   #1
fabianrios
Member
 
Registered: Apr 2005
Location: Atlanta
Distribution: FC3
Posts: 34

Rep: Reputation: 15
Unhappy Environmental variables... permanent


Hi,

I am trying to set permanently the next environmental variables: PATH, MANPATH, INTEL_LICENSE_FILE, which are required to run the ifortran compiler.

The variables can be set using the comand source with ifortvars.sh but this only set them during the use of the terminal and once I go out the variables retake the original value.

I tried to modify the file /etc/profile. When this file is open I get the next:

# /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 [ $EUID = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
fi

pathmunge /usr/X11R6/bin after
pathmunge /opt/intel/fc/9.0/bin after

# 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
unset pathmunge


It seems that the function pathmunge will change the PATH variable but even adding the new path /opt/intel/fc/9.0/bin doesn't do anything when I recheck the value of the PATH.


Does anybody knows how to work with this file and with the environmental variables in general?

Thanks in advance for any suggestion....

Fabian.
 
Old 10-20-2005, 02:38 PM   #2
tedfordgif
Member
 
Registered: Dec 2003
Posts: 43

Rep: Reputation: 15
Did you open a new shell after editting the file?
 
Old 10-20-2005, 05:06 PM   #3
fabianrios
Member
 
Registered: Apr 2005
Location: Atlanta
Distribution: FC3
Posts: 34

Original Poster
Rep: Reputation: 15
Talking

Sorry dude,
I was just trying and trying in the same shell until I gave up... This morning I came and the changes took effect... dahhhhhhhhhh!
Thanks for answering to the post though...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Environmental Variables danglingpointer Slackware 13 01-06-2005 12:36 AM
environmental variables msound Programming 0 08-21-2004 07:06 PM
environmental variables? blackzone Linux - General 1 08-06-2004 03:44 AM
finding environmental variables ChadFord Linux - Newbie 3 04-28-2004 09:36 PM
environmental variables mbhenry Linux - General 6 09-18-2003 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration