Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3E183E87.8116FECF@swipnet.se>
Date: Sun, 05 Jan 2003 15:17:44 +0100
From: a12 <a12@swipnet.se>
X-Accept-Language: en
MIME-Version: 1.0
To: "Pierre A. Humblet" <Pierre.Humblet@ieee.org>
CC: cygwin@cygwin.com
Subject: Re: Cygwin home dir=/cygwin/c (not /home/<userid>)
References: <Pine.GSO.4.44.0301021341260.8991-100000@slinky.cs.nyu.edu> <3E14B9ED.2318E8C9@swipnet.se> <20030102222853.GA313905@WORLDNET> <3E15C121.77213232@swipnet.se> <3E15C89C.21956358@ieee.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Yes, removing HOME from Windows system variables did it.

I thank you all cygwin gurus for support and valuable hints.

"Pierre A. Humblet" wrote:

> a12 wrote:
> >
> > Pierre,
> >
> > 'echo %HOME%' yields 'C:\'
> >
> > Modifying /etc/profile:
> > # Set up USER's home directory
> > # 020102 magr40 force to use /home/$USER
> > #if [ -z "$HOME" ]; then
> >   HOME="/home/$USER"
> > #fi
> > solves my problem, but is it the correct way to do it ?
>
> It's correct but not particularly elegant as it duplicates
> what passwd is supposed to be for.
> I assume HOME is defined as a system variable in the Windows
> environment and it is the same for everybody.
> Is there a good reason for that?
> Otherwise undefine it and everything will be well.
>
> For reference, here is how HOME is set, in order of priority
> - When starting from Windows
> 1) From existing HOME in Windows environment, translated to Posix
> 2) If the user has an entry in passwd:
>    a) from passwd, if the home directory field in non empty
>    b) from HOMEDRIVE/HOMEPATH
> 3) /
> - telnetd and rlogind
> 1) From passwd, if it is a valid directory
> 2) /
> - sshd
> 1) From passwd, even if it is invalid.
>    In that case /etc/profile may actually create it.
>
> Note that in all those cases HOME is never set in /etc/profile !
>
> Pierre
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

