How to add ENV VAR?

Jean-Eric jec at rptec.ch
Tue Oct 25 14:25:43 UTC 2005


Hi,
I wonder what is the *clean* way of adding ENV VAR in Ubuntu/Debian?
In Fedora, there is a special place in /etc/profile.d/ where apps can 
add some scripts that are sourced by /etc/profile, so each new shell can 
get new ENV_VAR or other goodies (color ls, etc...)

The use case is:
- I install Java
- I would like that JAVA_HOME be pointed to that install

In Fedora, the java package installs /etc/profile.d/java.sh which contains
   export JAVA_HOME=/usr/lib/java1.4.2

so everytime I run a new shell, I get JAVA_HOME

Is there something similar in Ubuntu? Modifying /etc/profile is not a 
valid option IMO...

Thanks
-jec

-- 
Jean-Eric Cuendet
Riskpro Technologies SA
Av. Louis-Ruchonnet 2, 1003 Lausanne, Switzerland
Web       : http://www.rptec.ch
Direct    : +41 21 637 0123
Principal : +41 21 637 0110
Fax       : +41 21 637 0111
Perso     : http://jesc.ch
--------------------------------------------------------




More information about the ubuntu-users mailing list