From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id 531AE3858C50 for ; Wed, 5 Apr 2023 02:57:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 531AE3858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x535.google.com with SMTP id ek18so137677442edb.6 for ; Tue, 04 Apr 2023 19:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680663429; x=1683255429; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=t4/apG5n2js9U4nekPjN9XOLR0t4wOQK+SWrk8reock=; b=HpvRl2pbNJMMB4xYxXIqBykxdGTIO8LHb8Pv3GniHM8+5MCaLjsXxwYkxGrZtS1q8K 7y9vUAUusQBT3ELPxbj3FJOLQcDTTrt7F8VPIJcm/f0fGP1yP3iWHZWWq66qh8QxHUBh zAsodnpbrq4kGGb7hCIUPS34f4a6gn1ORlztvmn9QvKd/jc3DYhSmoNGz2RMpvaj0xd1 kIRkDo520FJKbqPmtpSilhaEVt9xCh7RC5koRpNfuq+zrS2nhLyDCVIYFO+KSI5XTLWs EEzTNSBsYIl3VepJPYYA5UjDoioc2LfyED84ZopTTT2Kr03W4mPW7brQPtfUY7dmETpu kh9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680663429; x=1683255429; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t4/apG5n2js9U4nekPjN9XOLR0t4wOQK+SWrk8reock=; b=LrEbKkfLCGtX3GoJdHIczl2aogpgkJlHTCrvmvXOTxw35Z1FcBYhEG22o6zO95qZB0 sO8ll4gmEkaYGjCGB+cGDnbr/3BarkfydYfY7JqiQbESEnsIKiVPbGpXvKdPtftCRadD WlTuo+/VOGd60LICjwP+Erlr+7P6/EYKiN6Uy44075TbSMHLx8a64KcZyJQOHT7VyBlT v8E+l9VZ3pW+cqNCKEfNJUB8WzcuqFAgIX/B41FG2dUq/koO6bTgupsndm+EnbKnkcme J7QKNGZVq4alBk3QDei1w6BztwpQiT3lzc1dmec7rnWC+2HgQXg9+ArjNGluwx3o56zN bEWQ== X-Gm-Message-State: AAQBX9cR7We1V9XyWSVSqRYK8lYAM559l//jv0Vglv/J8cRIja8+7gIN TiGdmbilRZAY22jmOZ2QbxZKDsj3hDjCE9bMqGM/3qgtg1M= X-Google-Smtp-Source: AKy350YChzKqBlhSV8qSJm/dfSzTYxC3tG1wtQ3vQ1WgoDQMyLyBJadtY78HinZQmMJxkhsdX1QoqzeSSwMJ2acUYVo= X-Received: by 2002:a17:907:78cf:b0:947:9f2a:8ca0 with SMTP id kv15-20020a17090778cf00b009479f2a8ca0mr778605ejc.10.1680663429238; Tue, 04 Apr 2023 19:57:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Yuta SUZUKI Date: Wed, 5 Apr 2023 11:56:57 +0900 Message-ID: Subject: Re: Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11 To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=3.1 required=5.0 tests=BAYES_05,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Brian, Thank you for your reply. But I can't get the point so much... > This setting example is only a suggestion, not meant to be used verbatim,= and --- Yes. In my lab, I use another path for the default home. This is just a simple test configuration. > 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 mo= unted > ... ---- I think that usually cygwin automatically makes the directory assigned as the default home in nsswitch.conf (and indeed it does). I tried the same experiment with making C:\Users\test\cygwin manually before launching cygwin, but the same crash is reproduced. > When you change this field from the default, it is up to you to understan= d and support the setting. ---- Well, I know that I want to assign the home directory automatically to every user of my lab. I don't know the internal structure of cygwin and so what I can do is to only announce "Do not use cygwin at your very first sign-in to the machine. Re-sign-in before launching cygwin". But I think this is a bit ridiculous... > Cygwin startup is probably waiting for an automounter to provide the dire= ctory here, ---- Actually, in my experiment, cygwin does make the directory C:\Users\test\cygwin and even I could output cygcheck to C:\Users\test\cygwin\foo.out (or /cygdrive/c/test/foo.out). The problem is only in the crash of the window system. Addendum: Setting Windows environment variable HOME to be /cygdrive/c/users/test works without the issue, but it does affect another application in my lab as documented in cygwin's users guide. Yours, Yuta Suzuki 2023=E5=B9=B44=E6=9C=885=E6=97=A5(=E6=B0=B4) 4:46 Brian Inglis : > > 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 win= dow. > > 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 understan= d 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 mo= unted > by Cygwin at the user's Cygwin "login" as the user's Cygwin home director= y > /home/$USER. > > Cygwin startup is probably waiting for an automounter to provide the dire= ctory > here, just as if this were a Samba, NFS, or Unix network mount, or a Wind= ows > 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 =C3=A0 ajouter not when there is no mo= re to add > mais lorsqu'il n'y a plus rien =C3=A0 retirer but when there is no mo= re to cut > -- Antoine de Saint-Exup=C3=A9ry --=20 =E9=88=B4=E6=9C=A8 =E9=9B=84=E5=A4=AA =E7=AB=8B=E6=95=99=E5=A4=A7=E5=AD=A6 =E7=90=86=E5=AD=A6=E9=83=A8=E6=95=B0= =E5=AD=A6=E7=A7=91 =E5=8A=A9=E6=95=99 Yuta Suzuki Department of Mathematics, Rikkyo University suzuyu1729@gmail.com