Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20th March 2006, 07:47 AM
hari_mj23 Offline
Registered User
 
Join Date: Jun 2005
Posts: 5
environment variables?

hi,
when i type "env", the terminal displays the env variables which are being set. I would like to where I can modify these variables. will it b stored in some file?

moreover, when i use "getenv("TTY")" in a c program, i am not getting any value and it shows null. how to correct this?

thanks for help

hari
Reply With Quote
  #2  
Old 20th March 2006, 08:24 AM
bytesniper's Avatar
bytesniper Offline
Registered User
 
Join Date: May 2005
Location: Abq, NM
Age: 35
Posts: 1,158
to modify an environment variable you would either

1) on the command line type export <variable>=value

or, if you have several environment commands in a script you can

2) type source /path/filename

joseph
__________________
I am root. If you see me laughing you better have a backup.
Reply With Quote
  #3  
Old 20th March 2006, 08:25 AM
InKo's Avatar
InKo Offline
Registered User
 
Join Date: Dec 2005
Location: EU
Age: 36
Posts: 637
you can set the environment variables with
$ export MYCARIBABLE=....

I wrote a little test program and it works for me well with getenv...

is the variable defined what you are getenv'ing? is the name correctly used in c program?

well, it is all what I know.
__________________
The software required «Windows 98 or better», so I installed Linux.
Reply With Quote
  #4  
Old 30th March 2006, 02:24 AM
mikeshinoda11 Offline
Registered User
 
Join Date: Mar 2006
Posts: 13
Hi everyone..

I want to install Seadas software on my fedora 5..I download the tar.gz file from ftp samoa direct to /root/seadas4.9..i follow installation instruction until the come to this step I get stuck..

Set the SEADAS environment variable, where "PATH_TO_SEADAS" is
the full directory path to seadas (this is the path I want to set /home/rpm2006/seadas4.9):

-If you are running under csh or tcsh:
> setenv SEADAS PATH_TO_SEADAS
-If you are running under bash:
> export SEADAS=PATH_TO_SEADAS


can someone explain more on how to do this step pls..
Reply With Quote
  #5  
Old 30th March 2006, 07:29 AM
giulix's Avatar
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
To find out whether you're running bash or tcsh, type this at the console:
Code:
echo $SHELL
If you're running bash, put this at the end of your $HOME/.bashrc file:
Code:
export SEADAS=/home/rpm2006/seadas4.9
And then type '. $HOME/.bashrc' at the console
If you're running tcsh, put this at the end of your $HOME/.cshrc file:
Code:
setenv SEADAS /home/rpm2006/seadas4.9
And then type 'source $HOME/.cshrc' at the console
Reply With Quote
  #6  
Old 31st March 2006, 03:23 AM
mikeshinoda11 Offline
Registered User
 
Join Date: Mar 2006
Posts: 13
iguilix..I try to do this the whole day but it still not working..so if you dont mind can u assist me..

[QUOTE=giulix]To find out whether you're running bash or tcsh, type this at the console:

Code:
echo $SHELL
I m done with this step and the result is

[root@localhost ~]# echo $SHELL
/bin/bash
[root@localhost ~]#


then what should I do..
Reply With Quote
  #7  
Old 31st March 2006, 06:19 AM
giulix's Avatar
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
Open a terminal and type:
Code:
echo "export SEADAS=/home/rpm2006/seadas4.9" >> $HOME/.bashrc
. $HOME/.bashrc
And that should be it...
Reply With Quote
  #8  
Old 31st March 2006, 06:45 AM
mikeshinoda11 Offline
Registered User
 
Join Date: Mar 2006
Posts: 13
this is what I got..

[root@localhost seadas4.9]# echo "export SEADAS=/home/rpm2006/seadas4.9" >> $HOME/.bashrc
[root@localhost seadas4.9]# . $HOME/.bashrc
-bash: /root/seadas4.9/config/seadas.env: No such file or directory
[root@localhost seadas4.9]#


did u have any idea why "-bash: /root/seadas4.9/config/seadas.env: No such file or directory" appear..
Reply With Quote
  #9  
Old 31st March 2006, 07:53 AM
giulix's Avatar
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
I can only guess... apparently, no matter where you install it, seadas expects its installation directory to be /root/seadas4.9 or, more probably, $HOME/seadas4.9.

Last edited by giulix; 31st March 2006 at 07:56 AM.
Reply With Quote
  #10  
Old 3rd April 2006, 07:03 AM
mikeshinoda11 Offline
Registered User
 
Join Date: Mar 2006
Posts: 13
hmm..mby I try to do it all over again and I will let you know if I having the same error..

anyway thanks a lot giulix..
Reply With Quote
Reply

Tags
environment, variables

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment Variables nightmarcus Using Fedora 5 20th January 2009 11:31 AM
Environment Variables Curtor Using Fedora 4 14th February 2008 08:01 PM
setting environment variables craigni Using Fedora 0 25th December 2006 02:54 PM
Environment variables Flatron Using Fedora 7 28th January 2006 02:47 AM


Current GMT-time: 07:08 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat