public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Yuta SUZUKI <suzuyu1729@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11
Date: Wed, 5 Apr 2023 11:56:57 +0900	[thread overview]
Message-ID: <CAJ_58ir7cFbHcUeUoU3yaGT+zR7yUU9ehcerA4-voG3FtAFe=Q@mail.gmail.com> (raw)
In-Reply-To: <fb79d3f4-ef1e-cc9e-1596-6d76a8b73dfe@Shaw.ca>

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 mounted
> ...
---- 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 understand 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 directory 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年4月5日(水) 4:46 Brian Inglis <Brian.Inglis@shaw.ca>:
>
> 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



-- 
鈴木 雄太
立教大学 理学部数学科 助教
Yuta Suzuki
Department of Mathematics, Rikkyo University
suzuyu1729@gmail.com

  reply	other threads:[~2023-04-05  2:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 15:13 Yuta SUZUKI
2023-04-04 19:46 ` Brian Inglis
2023-04-05  2:56   ` Yuta SUZUKI [this message]
2023-04-05 19:55     ` Brian Inglis
2023-04-05 20:29       ` Yuta SUZUKI
2023-04-05 18:44 ` Thomas Wolff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ_58ir7cFbHcUeUoU3yaGT+zR7yUU9ehcerA4-voG3FtAFe=Q@mail.gmail.com' \
    --to=suzuyu1729@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).