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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-06-2009, 10:29 AM
|
#1
|
Member
Registered: Feb 2009
Posts: 36
Rep:
|
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
|
|
|
03-06-2009, 11:01 AM
|
#2
|
Member
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731
Rep:
|
Hi,
setting variable:
VARIABLE=VALUE (no spaces)
export $VARIABLE ( bring up in environment outside script)
You better use .bash_profile
|
|
|
03-06-2009, 11:11 AM
|
#3
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
Quote:
Originally Posted by mesiol
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
|
|
|
03-06-2009, 11:16 AM
|
#4
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
Quote:
Originally Posted by madani
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.
|
|
|
03-06-2009, 12:07 PM
|
#5
|
Member
Registered: Feb 2009
Posts: 36
Original Poster
Rep:
|
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
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.
|
|
|
|
03-06-2009, 12:15 PM
|
#6
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
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.
|
|
|
All times are GMT -5. The time now is 07:38 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|