Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11

Brian Inglis Brian.Inglis@Shaw.ca
Tue Apr 4 19:46:49 GMT 2023


On 2023-04-04 09:13, Yuta SUZUKI via Cygwin wrote:
> I am recently setting up the computer room of my faculty
> and then encountered the following issue:
> Short description:
> Change the default home directory via
> /etc/nsswitch.conf
> and make a new Windows user.
> Login to the new user (and do not logout) and launch cygwin.
> After opening another application's window, e.g. Explorer,
> and try to switch the focus between the cygwin window and the other window.
> After once or twice of switch, switching is not smooth
> and both the cygwin and the other application seem freezing.
> (Still we can launch powershell to restart the machine.)
> Procedure to reproduce the issue:
> 1. Login as an administrator.
> 2. Install cygwin with the default configuration.
> 3. In C:\cygwin64\etc\nssswitch.conf, replace
> # db_home:  /home/%U
> to
> db_home: /%H/cygwin

When you change this field from the default, it is up to you to understand and 
support the setting.

This setting example is only a suggestion, not meant to be used verbatim, and 
means that, for each Windows account at setup or login, under the user's Windows 
home directory, you will create a literal "cygwin" subdirectory, to be mounted 
by Cygwin at the user's Cygwin "login" as the user's Cygwin home directory 
/home/$USER.

Cygwin startup is probably waiting for an automounter to provide the directory 
here, just as if this were a Samba, NFS, or Unix network mount, or a Windows 
remote profile mount set up under 
{$USERPROFILE,$HOMEDRIVE$HOMEPATH}/AppData/Remote/.

Given the use of "cygwin" as a schema also here, this is possibly a poor 
example, which could be better documented.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


More information about the Cygwin mailing list