Noticed that mintty starts non-login bash with "Win+R mintty Enter".
Thomas Wolff
towo@towo.net
Tue Jan 5 10:31:54 GMT 2021
Am 04.01.2021 um 23:33 schrieb Oleksandr Gavenko via Cygwin:
> I interact with Cygwin via mintty launched as "Win+R mintty Enter".
>
> ...
> After looking into docs I got that mintty should be launched with a parameter "-".
>
> Probably it was always that way.
Yes, but it might be appropriate to apply special handling for this case
and imply login mode if started via Win+R.
What do others think?
> ================
>
> Checking POSIX standard on what might be defined in login shell:
>
> https://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html (1997)
> https://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd_chap08.html (2004)
>
> I noticed that USER is mentioned but LOGNAME is not only mentioned by
> description is given:
>
> The system shall initialize this variable at the time of login to be the
> user's login name.
>
> Cygwin's /etc/profile has:
>
> # Set the user id
> USER="$(/usr/bin/id -un)"
>
> but there is nothing for LOGNAME... Shouldn't /etc/profile set LOGNAME too?
Looks reasonable.
More information about the Cygwin
mailing list