*BSD News Article 93101


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!worldnet.att.net!howland.erols.net!news.mathworks.com!uunet!in2.uu.net!129.115.10.31!naiad.utsa.edu!uthscsa.edu!nnrp1.crl.com!not-for-mail
From: "Jordan K. Hubbard" <jkh@FreeBSD.org>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: New to FreeBSD -- where do I set global environment vars?
Date: Mon, 07 Apr 1997 19:37:48 -0700
Organization: Walnut Creek CDROM
Lines: 29
Message-ID: <3349AF7C.59E2B600@FreeBSD.org>
References: <5ib8ud$pge$1@news.depaul.edu>
NNTP-Posting-Host: time.cdrom.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01 (X11; I; FreeBSD 2.2-STABLE i386)
To: Jim Leonard <root@boxotrix.it-ias.depaul.edu>
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38712

Jim Leonard wrote:
> 
> I love FreeBSD 2.2.1 -- I've completely converted over to it.  I'm
> having a problem, however:  I want to set the environment variable
> TMPDIR set to a value, and have it show up for everything on the system.

Well, it sounds like what you're really asking is "how do I get all my
shells to initialize their environments from the same place?"

And the answer to that is "it depends!" :-)

If you're running csh, /etc/csh.cshrc would (at least according to its
man page) do the trick.

If you're running sh, I'm not sure - maybe /etc/profile?

If you're running any of the other shells, I have no idea. :)

If you're running make, make also has a global variable cache which it
checks in /etc/make.conf - you can set your globals there.

If it's really *you* who wants a value of TMPDIR, and setting it
globally for everyone would probably be a little anti-social for such an
important value, why not just set it in your own ~/.login or whatever
(depending, again, on your choice of shells) file?

-- 
- Jordan Hubbard
  FreeBSD core team / Walnut Creek CDROM.