delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/01/16:59:53

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_NEUTRAL
X-Spam-Check-By: sourceware.org
Message-ID: <4B1591CD.7050709@cornell.edu>
Date: Tue, 01 Dec 2009 16:59:41 -0500
From: Ken Brown <kbrown AT cornell DOT edu>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Environment variable documentation
References: <4B14415D DOT 1050701 AT cornell DOT edu> <20091201094531 DOT GE30043 AT calimero DOT vinschen DOT de> <4B154539 DOT 1030007 AT cornell DOT edu> <9f430e801d8adcf5868e1c5cf4276b43 DOT squirrel AT mail DOT morrison DOT mine DOT nu> <20091201210835 DOT GL8059 AT calimero DOT vinschen DOT de>
In-Reply-To: <20091201210835.GL8059@calimero.vinschen.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--------------020004020207010502000301
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 12/1/2009 4:08 PM, Corinna Vinschen wrote:
> On Dec  1 19:24, John Morrison wrote:
>> On Tue, December 1, 2009 4:32 pm, Ken Brown wrote:
>>> OK, my patch is attached.  It anticipates the change to the default
>>> .bashrc file that we've been discussing in the thread cited above.
>> Hi Ken,
>>
>> While I think it's a good idea to point out that they are (will be) unset
>> in the users .bashrc I'm not sure it's a good idea to tell people where
>> the default (/etc/defaults/etc/skel/.bashrc) is, since this will be
>> overwritten by the base package.  If people want to maintain their own set
>> of changes which is used in future that the package does not overwrite
>> /etc/skel/.bashrc is what they should edit.  However, since the skel files
>> are only copied *once* ~/.bashrc should be the first point of call.
>>
>> Hope that makes sense!
> 
> Good point.

I agree.  A revised patch is attached.

Ken

--------------020004020207010502000301
Content-Type: text/plain;
 name="environ.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="environ.patch"

--- setup2.sgml.orig	2009-12-01 10:37:00.156250000 -0500
+++ setup2.sgml	2009-12-01 16:57:26.093750000 -0500
@@ -4,7 +4,9 @@
 You may wish to specify settings of several important environment
 variables that affect Cygwin's operation.  Some of these settings need
 to be in effect prior to launching the initial Cygwin session (before
-starting your bash shell, for instance), and are, consequentially, best
+starting your bash shell, for instance).  They should therefore be set
+in the Windows environment; all Windows environment variables are
+imported when Cygwin starts.  Such settings can be
 placed in a .bat file.  An initial file is named Cygwin.bat and is created
 in the Cygwin root directory that you specified during setup.  Note that
 the "Cygwin" option of the Start Menu points to Cygwin.bat.  Edit
@@ -66,6 +68,34 @@
 <function>dlopen ()</function> call and do not need this variable.
 </para>
 
+<para>
+In addition to <envar>PATH</envar>, <envar>HOME</envar>,
+and <envar>LD_LIBRARY_PATH</envar>, there are three other environment
+variables which, if they exist in the Windows environment, are
+converted to UNIX format: <envar>TMPDIR</envar>, <envar>TMP</envar>,
+and <envar>TEMP</envar>.  The first is not set by default in the
+Windows environment but the other two are, and they point to the
+default Windows temporary directory.  If set, these variables will be
+used by some Cygwin applications, possibly with unexpected results.
+You may therefore want to unset them by adding the following two lines
+to your <filename>.bashrc</filename> file:
+
+<screen>
+unset TMP
+unset TEMP
+</screen>
+
+This is done in the default <filename>.bashrc</filename> file.
+Alternatively, you could set <envar>TMP</envar>
+and <envar>TEMP</envar> to point to <filename>/tmp</filename> or to
+any other temporary directory of your choice.  For example:
+
+<screen>
+export TMP=/tmp
+export TEMP=/tmp
+</screen>
+</para>
+
 </sect1>
 
 <sect1 id="setup-maxmem"><title>Changing Cygwin's Maximum Memory</title>


--------------020004020207010502000301
Content-Type: text/plain; charset=us-ascii

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
--------------020004020207010502000301--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019