LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   export environment variables at boot-up (http://www.linuxquestions.org/questions/linux-newbie-8/export-environment-variables-at-boot-up-708530/)

shan23 03-02-2009 03:45 AM

export environment variables at boot-up
 
Hi,

I'm installing a particular CAD tool which requires a environment variable to be defined as soon as the machine is turned on . I know i could do so by adding a "export ..." line in the .bashrc file, but then ( as far as i know) i have to edit the .bashrc file for all existing users in the machine...Also, i would have to manually add the line to all new users of the system.

I have tried adding the "export ABC=..." line in /etc/rc.d/rc.local , but when i rebooted the machine and logged in from a random account, i found ( by invoking "env" ) that the variable is not defined....

Pls suggest a suitable solution....I'm using Fedora 3 Enterprise

reddazz 03-02-2009 03:51 AM

You can set the variable globally in /etc/profile or by creating a script for your variable in /etc/profile.d.

shan23 03-02-2009 07:28 AM

thanks...works like a charm!! [:)]


All times are GMT -5. The time now is 05:03 AM.