* Noticed that mintty starts non-login bash with "Win+R mintty Enter".
@ 2021-01-04 22:33 Oleksandr Gavenko
2021-01-05 10:31 ` Thomas Wolff
0 siblings, 1 reply; 7+ messages in thread
From: Oleksandr Gavenko @ 2021-01-04 22:33 UTC (permalink / raw)
To: cygwin
I interact with Cygwin via mintty launched as "Win+R mintty Enter".
During first launch of "exim-config" script existed with an error:
/usr/bin/exim-config: line 447: USER: unbound variable
After looking into docs I got that mintty should be launched with a parameter "-".
Probably it was always that way.
================
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?
--
http://defun.work/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Noticed that mintty starts non-login bash with "Win+R mintty Enter".
2021-01-04 22:33 Noticed that mintty starts non-login bash with "Win+R mintty Enter" Oleksandr Gavenko
@ 2021-01-05 10:31 ` Thomas Wolff
2021-01-05 14:27 ` [cygwin] " Jason Pyeron
2021-01-07 7:34 ` Andrey Repin
0 siblings, 2 replies; 7+ messages in thread
From: Thomas Wolff @ 2021-01-05 10:31 UTC (permalink / raw)
To: cygwin
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [cygwin] Re: Noticed that mintty starts non-login bash with "Win+R mintty Enter".
2021-01-05 10:31 ` Thomas Wolff
@ 2021-01-05 14:27 ` Jason Pyeron
2021-01-16 23:09 ` Oleksandr Gavenko
2021-01-07 7:34 ` Andrey Repin
1 sibling, 1 reply; 7+ messages in thread
From: Jason Pyeron @ 2021-01-05 14:27 UTC (permalink / raw)
To: cygwin
> -----Original Message-----
> From: Thomas Wolff
> Sent: Tuesday, January 5, 2021 5:32 AM
>
> Am 04.01.2021 um 23:33 schrieb Oleksandr Gavenko via Cygwin:
> > I interact with Cygwin via mintty launched as "Win+R mintty Enter".
I do not put Cygwin in my windows PATH, (anymore since about 10 years ago).
> >
> > ...
> > 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?
I use an environment where settings are lost at logoff, so I have become accustomed to launching it from the command prompt.
I have not found it too difficult to type
c:\cygwin64\bin\mintty /bin/bash -l
>
> > ================
> >
> > 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.
> --
> Problem reports: https://cygwin.com/problems.html
> FAQ: https://cygwin.com/faq/
> Documentation: https://cygwin.com/docs.html
> Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Noticed that mintty starts non-login bash with "Win+R mintty Enter".
2021-01-05 10:31 ` Thomas Wolff
2021-01-05 14:27 ` [cygwin] " Jason Pyeron
@ 2021-01-07 7:34 ` Andrey Repin
2021-01-07 12:42 ` Kamran
1 sibling, 1 reply; 7+ messages in thread
From: Andrey Repin @ 2021-01-07 7:34 UTC (permalink / raw)
To: Thomas Wolff, cygwin
Greetings, Thomas Wolff!
> 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?
That would be overly complicated and least predictable.
--
With best regards,
Andrey Repin
Wednesday, January 6, 2021 15:53:33
Sorry for my terrible english...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Noticed that mintty starts non-login bash with "Win+R mintty Enter".
2021-01-07 7:34 ` Andrey Repin
@ 2021-01-07 12:42 ` Kamran
2021-01-16 22:57 ` Oleksandr Gavenko
0 siblings, 1 reply; 7+ messages in thread
From: Kamran @ 2021-01-07 12:42 UTC (permalink / raw)
To: cygwin
Win10 1909
tried Win+R | mintty - <enter>
works fine, also: Win | mintty - <enter>
also works for me
Even: Win | mintty - <Ctrl><Shift><enter>
opens up mintty with admin account. Off course I have to type password
(or swipe my finger on fingerprint scanner) for this to work
--
Kamran
Islamabad, Pakistan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Noticed that mintty starts non-login bash with "Win+R mintty Enter".
2021-01-07 12:42 ` Kamran
@ 2021-01-16 22:57 ` Oleksandr Gavenko
0 siblings, 0 replies; 7+ messages in thread
From: Oleksandr Gavenko @ 2021-01-16 22:57 UTC (permalink / raw)
To: cygwin
On 2021-01-07, Kamran via Cygwin wrote:
> Even: Win | mintty - <Ctrl><Shift><enter>
>
> opens up mintty with admin account.
Cool, I use <Ctrl><Shift><Enter> a lot but didn't know you can pass args!
--
http://defun.work/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Noticed that mintty starts non-login bash with "Win+R mintty Enter".
2021-01-05 14:27 ` [cygwin] " Jason Pyeron
@ 2021-01-16 23:09 ` Oleksandr Gavenko
0 siblings, 0 replies; 7+ messages in thread
From: Oleksandr Gavenko @ 2021-01-16 23:09 UTC (permalink / raw)
To: cygwin
On 2021-01-05, Jason Pyeron wrote:
> I do not put Cygwin in my windows PATH, (anymore since about 10 years ago).
Sometimes it is useful to have GNU utils at hands. I use Far Commander and in
order to find directory size I type:
du -s -m NAME
Also having Cygwin staff in PATH allows to start program elevated easily
(<Win> NAME <Ctrl><Shift><Enter>).
> I use an environment where settings are lost at logoff, so I have become
> accustomed to launching it from the command prompt.
>
> I have not found it too difficult to type
>
> c:\cygwin64\bin\mintty /bin/bash -l
It won't be productive for my workflow. I own dev PC, not restricted to
corporate policies and launch mintty hundred times a day (have CDPATH and
other convenience set as the environment is permanent).
Though I might get rid of Cygwin from PATH too.
For starting Emacs I wrote wrapper that run it elevated (and hides that
irritating console as I use emacs-w32) - it is a pleasure to be able to edit
Windows /etc/hosts from within Emacs ))
Same wrapper can be written for Mintty and placed to PATH.
Though I wouldn't do that because all IDEs are rely on git.exe from Cygwin...
It is pity that Mercurial comes with "shell" launcher, so cannot be used by
non-Cygwin programs.
--
http://defun.work/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-01-16 23:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 22:33 Noticed that mintty starts non-login bash with "Win+R mintty Enter" Oleksandr Gavenko
2021-01-05 10:31 ` Thomas Wolff
2021-01-05 14:27 ` [cygwin] " Jason Pyeron
2021-01-16 23:09 ` Oleksandr Gavenko
2021-01-07 7:34 ` Andrey Repin
2021-01-07 12:42 ` Kamran
2021-01-16 22:57 ` Oleksandr Gavenko
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).