From owner-freebsd-questions@FreeBSD.ORG Fri Oct 19 20:55:35 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 432EB16A418 for ; Fri, 19 Oct 2007 20:55:35 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by mx1.freebsd.org (Postfix) with ESMTP id 1395113C461 for ; Fri, 19 Oct 2007 20:55:33 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay8.apple.com (relay8.apple.com [17.128.113.38]) by mail-out3.apple.com (Postfix) with ESMTP id A29A915A4937; Fri, 19 Oct 2007 13:55:23 -0700 (PDT) Received: from relay8.apple.com (unknown [127.0.0.1]) by relay8.apple.com (Symantec Mail Security) with ESMTP id 8A3394000A; Fri, 19 Oct 2007 13:55:23 -0700 (PDT) X-AuditID: 11807126-a732cbb000000803-43-471919bb9aab Received: from [17.214.13.96] (cswiger1.apple.com [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay8.apple.com (Apple SCV relay) with ESMTP id 76CF540117; Fri, 19 Oct 2007 13:55:23 -0700 (PDT) In-Reply-To: <4718D7D4.2010604@gmail.com> References: <4718D7D4.2010604@gmail.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9D00D54D-F7C9-4D38-973F-EB7A28933AC0@mac.com> Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Fri, 19 Oct 2007 13:55:22 -0700 To: Aryeh M. Friedman X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== Cc: freebsd-questions@freebsd.org Subject: Re: [stupid question] setting env variables globally X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2007 20:55:35 -0000 On Oct 19, 2007, at 9:14 AM, Aryeh M. Friedman wrote: > Is there any way to set the default value of a enviromental variable > globally. Specifically I want JAVA_VERSION to default to "1.6" > unless > the user sets it other wise. By global I mean no matter how > something > is invoked (command line, script, GUI, IPC trigger, etc.) if it checks > the value of the var it gets the same value (and I want to do this > system wide) Setting variables in /etc/profile and /etc/csh.cshrc (respectively) will do it for the common shells; or perhaps you might look at /etc/ login.conf... -- -Chuck