LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 11-19-2005, 01:18 PM   #1
simjii
Member
 
Registered: Nov 2003
Distribution: SUSE 11.0 32bit and11.2 x86_64
Posts: 77

Rep: Reputation: 16
Unhappy Environment variables setting...


I am new to SUSE but familiar with Linux. I have been using Mandrake several years but one program that I need made me to learn SUSE.
I am trying to set environment variables for my user account but no luck so far.
I added following variables in ~/.profile and reloged in but no effect.

####### Added variables ##########
PATH=$PATH:$HOME/bin:/usr/local/bin
export PATH
LD_LIBRARY_PATH=/usr/local/matlab13/bin/glnx86:/usr/local/matlab13/sys/os/glnx86:/usr/local/ntel_mkl_72/mkl72/lib/32:/usr/local/intel_fc_81/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
export INCLUDE=/usr/local/intel_mkl_72/mkl72/include
INTEL_LICENSE_FILE=/usr/local/intel_fc_81/licenses
LM_LICENSE_FIL=/usr/local/ABAQUS/abaqus
export INTEL_LICENSE_FILE
export LM_LICENSE_FILE
######### up to here #######

I don't see LD_LIBRARY_PATH, INTEL_LICENSE_FILE and LM_LICENSE_FILE as an output of 'export' command. Am I doing something wrong here ?
This same setting works fine on Mandrake 10.0, 10.1. I am kind of lost.


Thanks for reply in advance.
 
Old 11-19-2005, 02:22 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,027
Blog Entries: 5

Rep: Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789
I wonder why your reply went wide screen? No matter...

Environment gets set by multiple things (/etc/profile, /etc/bashrc, $HOME/.profile, $HOME/.bashrc and perhaps others).

If the .profile has another line lower that sets LD_LIBRARY_PATH= that does NOT start LD_LIBRARY_PATH=$LD_LIBRARY_PATH:....
then it will simply overwrite anything in LD_LIBRARY_PATH to that point rather than appending. Similarly if .bashrc has anything setting LD_LIBRARY_PATH
then it will overwrite. Also any of these files may be "sourcing" other environmental files that sets LD_LIBRARY_PATH. Usually a file being "sourced" will
be in one of the others with ". <filename>" (dot space <filename>). Also if its calling a script that sets a variable (no dot space - just a name or sh then a
name) it could be setting a variable. You'd basically need to examine your .profile and .bashrc for these (assuming you're using bash as your shell - if
using ksh it wouldn't read .bashrc and if using csh it wouldn't read .profile or .bashrc - it would read .login).
 
Old 11-19-2005, 02:48 PM   #3
simjii
Member
 
Registered: Nov 2003
Distribution: SUSE 11.0 32bit and11.2 x86_64
Posts: 77

Original Poster
Rep: Reputation: 16
Thanks for replying jlightner.

First, I am using bash.
I didn't change anything in ~/.profile, ~./bashrc and /etc/profile, /etc/bashrc from default installation except
appending the environment variables that are listed in the first post in ~/.profile.
Even 'export INTEL_LICENSE_FILE=/usr/local/intel_fc_81/licenses' command in a shell window does not set this variable.
I am really confused.
 
Old 11-19-2005, 05:28 PM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,027
Blog Entries: 5

Rep: Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789
Odd that a command line change after login wouldn't work.

It may not matter if you changes .bashrc - it may just be different by default on your new distro. I'd certainly explore it.

Do "ps" from command line (no options to "ps" - just "ps" by itself). This will show what you're running.
Just suggesting you do this to verify you are in fact running bash as you think.

Also I hate to ask but just to be sure: You do know that after setting variable you have to reference it by prepending
a dollar sign (e.g. PATH= defines it but $PATH is what you have to look at afterwards)? Not trying to insult you just
not sure what you know.


Assuming you ARE running bash and have set the variable as you state try:

"echo $INTEL_LICENSE_FILE" to see if it shows anything.

It may be that the shell you're using somehow doesn't understand the "export VAR=...." format. Try doing it the old
fashioned way where you define on one line then export on the next:

VAR=...
export VAR


I haven't used Mandrake. Apparently there is one distro (Ubuntu?) that only allows you to do things as root with sudo so
maybe Mandrake has some wierd setup like that where it protects the root environment. Are you doing the export as the
root user or as a non-root user? If non-root what happens if you try it as root or vice-versa?

A final thought. You're not setting the environment then typing in bash or su are you?

Last edited by MensaWater; 11-19-2005 at 05:31 PM.
 
Old 11-19-2005, 08:50 PM   #5
simjii
Member
 
Registered: Nov 2003
Distribution: SUSE 11.0 32bit and11.2 x86_64
Posts: 77

Original Poster
Rep: Reputation: 16
Talking It works now !!

Thanks lightner again for your reply.

I am very confused. Now it works fine. I just re-logged in and every variable was set properly.
very odd. Now I can try what I really need.
 
  


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
Setting Environment Variables rbh123 Linux - Newbie 2 10-03-2005 07:34 PM
Need help setting environment variables. cottonmouth Linux - Newbie 3 12-09-2004 05:54 PM
setting environment variables jayjoh Linux - Newbie 9 07-12-2004 01:35 PM
setting environment variables durden2.0 Linux - Newbie 5 07-15-2003 02:57 PM
setting environment variables rezza Linux - Distributions 2 04-09-2003 09:21 AM


All times are GMT -5. The time now is 05:28 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration