X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <17697476.post@talk.nabble.com>
Date: Fri, 6 Jun 2008 10:38:46 -0700 (PDT)
From: anadem <anadem@gmail.com>
To: cygwin@cygwin.com
Subject: Re: how can I stop Windows setting HOME?
In-Reply-To: <4848A716.5010200@cygwin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Nabble-From: anadem@gmail.com
References: <17682731.post@talk.nabble.com> <dd3cefac0806051822i3dc7b4d2pf943f33335b29cb3@mail.gmail.com> <dd3cefac0806051842l650b7657u5f0ae0e696cce0bf@mail.gmail.com> <4848A716.5010200@cygwin.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com



Larry Hall (Cygwin) wrote:
> 
> Adam Thompson wrote:
>> 2008/6/6 Adam Thompson <adwulf@gmail.com>:
>>> 2008/6/6 anadem <anadem@gmail.com>:
>>>> Is there any way to permanently unset the HOME env-var in Windows? I
>>>> could
>>>> run a batch file at startup but afaik that would not be a systemwide
>>>> removal
>>>> of HOME.
>>>>
>>> I do not think this is a Windows issue.
>>>
> 
> Generally speaking, you're right that Windows doesn't set HOME but
> rather HOMEDRIVE and HOMEPATH.  If HOME is getting set in the Windows
> environment, something else that's installed is setting it and Cygwin
> is just going along with it because it's set in the environment.  If
> it is not possible to figure out what is setting HOME for Windows, you
> can unset it in cygwin.bat, or whatever mechanism Cygwin is started
> with, as you noted.  But it would be better to find the source and
> squash it.  And although you pointed at the right FAQ entry describing
> the hierarchy of rules used for setting HOME within Cygwin's environment,
> your interpretation is a bit off.  As the FAQ states, HOME is determined
> by one of the following in order of decreasing priority:
> 
>     1. HOME from the Windows environment, translated to POSIX form.
>     2. The entry in /etc/passwd
>     3. HOMEDRIVE and HOMEPATH from the Windows environment
>     4. /
> 
> Once one of these rules is fulfilled, the remainder are skipped.  So
> if HOME is set in the Windows environment, Cygwin will use that (converted
> to POSIX form).  If it's not and there's an '/etc/passwd' file with an
> entry
> for the current user, the home path specified there will be used.
> Otherwise,
> HOMEDRIVE and HOMEPATH will be used to define HOME in CYGWIN (again,
> converted to POSIX form).  And, if for some reason none of these other
> rules fire, HOME is set to '/'.
> 
> It is highly recommended that one let rule #2 fire, since '/etc/passwd' is
> the source of the home path used by Cygwin's telnet, ssh, etc. 
> Consistency
> between these utilities and your default Cygwin shell/environment is
> very likely to eliminate future brain strains. ;-)
> 

Ah, yes, thanks all, it's possibly MKS Toolset. Now if only I can figure out
HOW it's doing it. 
There's no autoexec and nothing in Startup. Maybe I'll just adjust
cygwin.bat (plus warn co-workers to unset $HOME before installing cygwin,
and give my strained brain a warm bath.) 
-- 
View this message in context: http://www.nabble.com/how-can-I-stop-Windows-setting-HOME--tp17682731p17697476.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

