LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General > LinuxQuestions.org Member Intro
User Name
Password
LinuxQuestions.org Member Intro New to LinuxQuestions.org? Been a long time member but never made a post? Introduce yourself here.

Notices

Reply
 
Search this Thread
Old 08-05-2008, 01:32 AM   #1
sarayazdani
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Rep: Reputation: 0
defining environmental variables?


Dear all,

I have downloaded fully complied XCRYSDEN software from www.xcrysden.org. But in the procedure of installing this package according to the tutoral we should follow the steps as below:

1. Unpack the *.tar.gz archive-file. I have unpacked it in the root
2. Define the XCRYSDEN_TOPDIR and XCRYSDEN_SCRATCH environmental variables (XCRYSDEN_TOPDIR should point to XCrySDen root directory).I do not know how I can define them, please answer me???
3. Create the XCRYSDEN_SCRATCH directory. I have done it.
4. Launch the program as xcrysden.when I do I encounter the following error: ./xcrysden: line 129: /scripts/xcLib.sh: No such file or directory, please let me know how I can correct it?
5. From time to time clean the $XCRYSDEN_SCRATCH directory. For example, use the xc_cleanscratch utility.

BEWARE: it is recomemded to run the "./xcConfigure" script instead !!! [READ BELOW]
I have done it but I can not modify the profile???

Finally it has said that we should follow the below procedure after configuration:

source ~/.cshrc
For for sh-shell execute:
. ~/.profile
For bash-shell execute:
. ~/.bashrc
which is not done or it gives me errors.

I really need your answers quickly sine I need to install it for my project.

I am waiting for your quick response.

regards,
Sara Yazdani
 
Old 08-05-2008, 04:08 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
I don't think the root directory is the best place to add this program. Manually added programs are usually best placed somewhere like /usr/local/bin. But hey, it's up to you.

Environmental variables are user-configurable settings the shell uses. In bash you can set a variable with VARIABLENAME="variable_setting". So what you need to do is run:
Code:
XCRYSDEN_TOPDIR="/path/to/xchrisden_root_directory"
XCRYSDEN_SCRATCH="/path/to/xchrisden_scratch_directory"
Now you should be able to run the program in that shell. You can run the 'env' command to see a list of the variables you have set up. Note that an environmental variable will only be set for that shell, and it will be lost when you close the terminal. You have to place the lines in your ~/.bashrc or /etc/bashrc (for global access) if you want to make them permanent.

Other shells, like the csh you mention, should have a similar syntax but may not be exactly the same. Check the shell's man page. If you don't know what shell you're using, it's probably bash, since that's the Linux default.

Note that the xcConfigure program will do all the above for you, including adding the variables to your bashrc. So I suggest deleting everything and starting over, and run xcConfigure first. Only fall back to setting it manually if nothing else works.

Last edited by David the H.; 08-05-2008 at 04:12 AM.
 
  


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
Qt Environmental Variables Slackware? FreakboY Programming 3 05-25-2008 03:14 AM
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
environmental variables mbhenry Linux - General 6 09-18-2003 11:41 AM


All times are GMT -5. The time now is 12:44 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