LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-06-2009, 10:29 AM   #1
madani
Member
 
Registered: Feb 2009
Posts: 36

Rep: Reputation: 15
setting environment variable


Hi Dear friends;

The distribution of linux I use is centos 5.2:

In the Makefile of a program that I'm trying to compile and use ( LMTO_DMFT ) there is this comment :

" # Please set environment variable LMTO_DMFT_ROOT (in ~/.bashrc) to the same path as DESTDIR in this Makefile "

I specified My DESTDIR path like :
" DESTDIR = /home/Noushin/ALL-LDA+DMFT/Haule/version_1.7e/bin "

Please tell me the exact expression that I must add to my ??? file?

Am I right, " ??? " is the file: /etc/.bashrc?

Last edited by madani; 03-06-2009 at 10:52 AM. Reason: distribution wasn't mentioned
 
Old 03-06-2009, 11:01 AM   #2
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

setting variable:
VARIABLE=VALUE (no spaces)
export $VARIABLE ( bring up in environment outside script)

You better use .bash_profile
 
Old 03-06-2009, 11:11 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by mesiol View Post
setting variable:
VARIABLE=VALUE (no spaces)
export $VARIABLE
I don't think that $ is correct.

Anyway, you can do the whole command as one command:
export VARIABLE=VALUE
 
Old 03-06-2009, 11:16 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by madani View Post
Please tell me the exact expression that I must add to my ??? file?
Code:
export LMTO_DMFT_ROOT=/home/Noushin/ALL-LDA+DMFT/Haule/version_1.7e/bin
Quote:
Am I right, " ??? " is the file: /etc/.bashrc?
I'm not an expert on that detail. I'm not sure of the operational difference between .bashrc and .bash_profile

I have always edited those files in my own home directory, not in /etc/
Especially for a change that seems to be specific to one home directory, I think it makes sense to edit .bash_profile in that home directory.

Last edited by johnsfine; 03-06-2009 at 11:21 AM.
 
Old 03-06-2009, 12:07 PM   #5
madani
Member
 
Registered: Feb 2009
Posts: 36

Original Poster
Rep: Reputation: 15
setting environment variables

Thanks for your kind answer. Would you tell me in detail what shoud I do? I'm a newbie!!


Quote:
Originally Posted by johnsfine View Post
Code:
export LMTO_DMFT_ROOT=/home/Noushin/ALL-LDA+DMFT/Haule/version_1.7e/bin


I'm not an expert on that detail. I'm not sure of the operational difference between .bashrc and .bash_profile

I have always edited those files in my own home directory, not in /etc/
Especially for a change that seems to be specific to one home directory, I think it makes sense to edit .bash_profile in that home directory.
 
Old 03-06-2009, 12:15 PM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Create or edit the file /home/Noushin/.bash_profile and add the line I gave you.
Then log out and log back in again.

I'm assuming Noushin is the name you login with. Otherwise, that isn't the right bash profile to edit.

Last edited by johnsfine; 03-06-2009 at 12:16 PM.
 
  


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
environment variable setting chii-chan Linux - General 5 01-23-2009 07:29 PM
setting environment variable kb_ganesh Ubuntu 3 09-10-2005 01:58 PM
Setting up a environment variable Hiper1 Linux - Newbie 3 03-08-2005 08:43 AM
Trouble setting environment variable exitsfunnel Linux - Software 4 10-06-2004 06:49 AM
Setting an environment variable kharris Linux - General 3 10-02-2003 04:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:38 AM.

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