From owner-freebsd-questions@FreeBSD.ORG Fri Oct 19 22:03:15 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 16B6816A41B for ; Fri, 19 Oct 2007 22:03:15 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from ozzie.tundraware.com (ozzie.tundraware.com [66.92.130.199]) by mx1.freebsd.org (Postfix) with ESMTP id AF09A13C469 for ; Fri, 19 Oct 2007 22:03:08 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from [192.168.0.2] (viper.tundraware.com [192.168.0.2]) (authenticated bits=0) by ozzie.tundraware.com (8.14.1/8.14.1) with ESMTP id l9JM33Lx085783 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Oct 2007 17:03:03 -0500 (CDT) (envelope-from tundra@tundraware.com) Message-ID: <4719299A.8050103@tundraware.com> Date: Fri, 19 Oct 2007 17:03:06 -0500 From: Tim Daneliuk Organization: TundraWare Inc. User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: FreeBSD Mailing List References: <4718D7D4.2010604@gmail.com> <20071019211433.GA76124@owl.midgard.homeip.net> In-Reply-To: <20071019211433.GA76124@owl.midgard.homeip.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-tundraware.com-MailScanner-Information: Please contact the ISP for more information X-tundraware.com-MailScanner: Found to be clean X-tundraware.com-MailScanner-From: tundra@tundraware.com X-Spam-Status: No Subject: Re: [stupid question] setting env variables globally X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: tundra@tundraware.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2007 22:03:15 -0000 > On Fri, Oct 19, 2007 at 04:14:12PM +0000, 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) > For userland stuff that is invoked after a login (i.e. In some user's login context), I have a master profile I keep in /usr/local/etc/.myprofile. I then source this from the .profile or .bashrc in a given user's account. If you need this for cron jobs, there is a way to set environment variables in the crontab entry IIRC... HTH, ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/