Environment vars - where to set?

Colin Watson cjwatson at canonical.com
Sat Oct 9 13:27:02 UTC 2004


On Sat, Oct 09, 2004 at 02:06:19PM +0100, Darren Wheatley wrote:
> I've been reading a few posts here in this subject and wondered if anyone
> could give me a definitive answer to the following questions:
> 
> 1. Personal environment variables, e.g. JAVA_HOME: I am setting them in
> ~/.gnomerc
> 
> Is this correct? Can I also tailor PATH there, set aliases etc?

~/.bashrc is probably better, especially if you uncomment the bit in
~/.bash_profile that sources ~/.bashrc.

> 2. Server environment variables, e.g. could also be TOMCAT_HOME:
> 
> Where do I set these so that server processes can pick them up?

I generally do that in the init script for the relevant service.

-- 
Colin Watson                                    [cjwatson at canonical.com]




More information about the ubuntu-users mailing list