X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <dd3cefac0806051842l650b7657u5f0ae0e696cce0bf@mail.gmail.com>
Date: Fri, 6 Jun 2008 02:42:04 +0100
From: "Adam Thompson" <adwulf@gmail.com>
To: cygwin@cygwin.com
Subject: Re: how can I stop Windows setting HOME?
In-Reply-To: <dd3cefac0806051822i3dc7b4d2pf943f33335b29cb3@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <17682731.post@talk.nabble.com> 	 <dd3cefac0806051822i3dc7b4d2pf943f33335b29cb3@mail.gmail.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

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.
>

Further to this, a quick google reveals:

"The HOME environment variable is used by UNIX shells to determine the
location of your home directory. This environment variable is
converted from the Microsoft Windows format (that is, C:\home\bob) to
UNIX format (that is, /home/bob) when a Cygwin process first starts.
To prevent confusion, ensure that HOME and /etc/passwd agree on your
home directory."

http://www.redhat.com/docs/manuals/gnupro/GNUPro-Toolkit-03r1/gnupro_8.html

So, it would seem that Cygwin takes the value of (correct me here):

%HOMEDRIVE% + %HOMEPATH%

or more likely (and reliably - remember %HOMESHARE%):

%USERPROFILE%

And imports it to $HOME

Depending on how you launch cygwin, you may be able to start it with a
script or .pif that sets these variables to what you require.

See: http://www.cygwin.com/faq/faq.setup.html#faq.setup.home - which
suggests that HOMEDRIVE and HOMEPATH are used instead of USERPROFILE.

-- 
AdamT
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." - Nietzsche

--
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/

