Andrey Repin anrdaemon@yandex.ru
Sat Feb 14 00:50:00 GMT 2015

Greetings, Denis Excoffier!

>>> On Feb 13, 2015, at 11:30 AM, Denis Excoffier <cygwin@Denis-Excoffier.org> wrote:
>>> I tried (according to the new documentation):
>>> db_home: /%H/%U/cygdir
>>> and that was fine but %H was replaced by the
>>> /cygdrive/C/Document and Settings/<user> prefix
>> I don’t think you should use %H when that directory might contain spaces.  It’s likely to cause many problems.

> You misunderstand. I don't need this stupid 'Document and Settings' thing.
> I need %H to represent my home dir, that means
> /cygdrive/d/Home/myuser1 on this XP P3 (a corporate one) and

%H represents your WINDOWS home directory.
That's it, %HOMEDRIVE%%HOMEPATH%. It already contain your login name, if that
is appropriate for your profile directory.

From https://cygwin.com/cygwin-ug-net/ntsec.html

Windows home directory in POSIX style. Note that, for the db_home: setting,
this only makes sense right after the preceding slash, as in

  db_home:  /%H/cygwin

> /cygdrive/c/Users/myuser2 on this W7 (another corporate).
> That way, using %H/%U/cygdir under both architectures would generate the right thing.

> But currently, on XP SP3, the %H is replaced by '/cygdrive/d/Document and Settings/myuser1' which i'm pretty
> close to consider as a bug. Should be '/cygdrive/d/Home/myuser1' i suppose.

I have a feeling that you have %HOME% defined before mintty starts.
I just made some tests, and it seems to be the showstopper.
If %HOME% is already set, nsswitch.conf:db_home is ineffective.
Simple check for

    mintty -

instantly picked the right settings from nsswitch.conf
I don't know, if this is intended behavior... We'd need an expertise here.

>> I may be misunderstanding your desire.  If you actually want Cygwin home
>> directories under c:\Documents and Settings, you can combine nsswitch.conf
>> settings with a custom mount point in fstab to avoid the need for spaces in
>> $HOME:
>>    C:/Documents\040and\040Settings /home ntfs binary 0 0

> Good idea (a symlink would also do the job wouldn'it?)

Naaw, setup have a habit or removing symlink replacements for standard
It may be safe for /home, as no packages contain files in there, though.

> but i really don't
> need this. I don't like spaces in filenames either: they don't fit nicely in makefiles.

Andrey Repin (anrdaemon@yandex.ru) 14.02.2015, <01:52>

Sorry for my terrible english...

More information about the Cygwin mailing list