LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 12-02-2007, 12:46 AM   #1
piyush.kansal
LQ Newbie
 
Registered: May 2007
Location: Pune, India
Distribution: Fedora Core
Posts: 29

Rep: Reputation: 15
How to set up an system wide environment variable permanently??


Hi,
Objective:
Its to set up a system wide environment variable permanently, I want to set CVSROOT to /usr/local/CVS. Also, I want to get it set immediately i.e i dont want to reboot my machine..

Distribution?
Fedora Core 1

Problem:
I am unable to do so

What has been tried?
I put following in the last line of /etc/profile file (as a root):
CVSROOT="/usr/local/CVS"
and then I tried to get it set immediately by running following:
[root@localhost piyushkansal]# . /etc/profile
After this when I echo'ed the same, it worked:
[root@localhost piyushkansal]# echo $CVSROOT
/usr/local/CVS
But when i tried to do get code (from local login, not root) from CVS it gave me an error. You can see the following sequence of commands i fired from my local login but it didnt work:
[piyushkansal@localhost HelloWorld]$ cvs co -d 2 KernelDevelopment
cvs checkout: No CVSROOT specified! Please use the `-d' option
cvs [checkout aborted]: or set the CVSROOT environment variable.
[piyushkansal@localhost HelloWorld]$ echo $CVSROOT

[piyushkansal@localhost HelloWorld]$ . /etc/profile
[piyushkansal@localhost HelloWorld]$ echo $CVSROOT
/usr/local/CVS
[piyushkansal@localhost HelloWorld]$ cvs co -d 2 KernelDevelopment
cvs checkout: No CVSROOT specified! Please use the `-d' option
cvs [checkout aborted]: or set the CVSROOT environment variable.
[piyushkansal@localhost HelloWorld]$

I even tried to reboot my system and it didnt work even after that. I also tried to set CVSROOT to /usr/local/CVS/ but it didnt work too...

Please suggest me if I am missing something....
 
Old 12-02-2007, 12:58 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
Is the directory writable by all the users?
 
Old 12-02-2007, 01:14 AM   #3
piyush.kansal
LQ Newbie
 
Registered: May 2007
Location: Pune, India
Distribution: Fedora Core
Posts: 29

Original Poster
Rep: Reputation: 15
Hi,
Besides root, I have got only one more user configured and that is "piyushkansal"...and this user has already got the rights:

[root@localhost 2]# ll /usr/local/ | grep CVS
drwxrwsr-x 5 root piyushkansal 4096 Dec 1 12:32 CVS
[root@localhost 2]#

Here for "others", its not writable, but will it make a difference?
 
Old 12-02-2007, 01:44 PM   #4
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
Are you using the export command to make the variable available?
 
Old 12-04-2007, 11:50 PM   #5
piyush.kansal
LQ Newbie
 
Registered: May 2007
Location: Pune, India
Distribution: Fedora Core
Posts: 29

Original Poster
Rep: Reputation: 15
Not in /etc/profile.
But yes, I am using it so that initialize CVSROOT with the same value, but that it session dependent. As soon as i close the session, it goes away, so its temporary.
 
Old 12-07-2007, 04:04 AM   #6
piyush.kansal
LQ Newbie
 
Registered: May 2007
Location: Pune, India
Distribution: Fedora Core
Posts: 29

Original Poster
Rep: Reputation: 15
Any suggestions, please?
 
  


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
how do I set a system wide enviroment variable? (not just bash) drkstr Linux - Newbie 11 04-19-2006 09:09 AM
how to set environment variable pranith Linux - Newbie 1 01-27-2005 11:23 PM
How to set an environment variable? dantemarmol Linux - Newbie 7 08-22-2003 10:59 AM
How to set variable permanently in rc.local(RH7.3)? beep_beep Linux - General 7 09-25-2002 12:35 PM
System wide Environment variables Steave Linux - General 1 02-08-2002 05:44 PM


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