public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
To: cygwin@cygwin.com
Cc: Takashi Yano <takashi.yano@nifty.ne.jp>
Subject: Re: [ANNOUNCEMENT] cygwin 3.1.0-0.6 (TEST)
Date: Mon, 14 Oct 2019 11:07:00 -0000	[thread overview]
Message-ID: <99298a9a-5de3-0e14-0128-c693b278f5e7@ssi-schaefer.com> (raw)
In-Reply-To: <20191011182439.6dd3fedb2c7138627e53c053@nifty.ne.jp>

On 10/11/19 11:24 AM, Takashi Yano wrote:
> Hi Michael,
> 
> On Thu, 10 Oct 2019 12:43:56 +0200
> Michael Haubenwallner wrote:
>> I'm encountering another strange behaviour I do not remember to have seen before:
>>
>> Using ssh from some Linux xterm into the Cygwin sshd running on Server 2019
>> does clear the current terminal content as if /usr/bin/clear was executed.
> 
> This is intentional behaviour.
> 
> The pseudo console has its own screen buffer behind, and redraws
> the screen based on the screen buffer at undetermined timing.> The screen buffer is empty at the beginning, so the screen should
> be cleared at the opening of the pty so that the real screen and
> the screen buffer are synchronozed.
> 
> The clear screen is prevented when TERM=dumb, so you can see what
> happens if clear screen is not done by following steps.> 
> 1)  Execute ls or ps to draw something to screen.
> 2) env TERM=dumb ssh <cygwin-hostname>
> 3) Execute cmd.exe.

Well... even that one is counter intuitive regarding the 'Last login' line.
After login into Cygwin sshd, the 'Last login' line is not shown:

haubi@linuxbox ~ $ ssh cygwin2019
----------------------------------------
> 
> haubi@cygwin2019 ~
> $
> 
> 
> 
> 
> 
> 
> 
----------------------------------------

When starting cmd, the terminal does loose colors, and the 'Last login'
line suddenly is shown as first line:
----------------------------------------
> Last login: Mon Oct 14 12:30:52 2019 from 192.168.56.1
> 
> haubi@cygwin2019 ~
> $ cmd
> Microsoft Windows [Version 10.0.17763.805]
> (c) 2018 Microsoft Corporation. All rights reserved.
> 
> C:\cygwin64\home\haubi> 
> 
> 
----------------------------------------

However, with TERM=dumb, the terminal content is:
----------------------------------------
> {some output from previous linux commands}
> {some output}
> {some output}
> {some output}
> {some output}
> haubi@linuxbox ~ $ TERM=dumb ssh cygwin2019
> Last login: Mon Oct 14 12:37:24 2019 from 192.168.56.1
> 
> haubi@cygwin2019 ~
> $ 
----------------------------------------

And when cmd was started:
----------------------------------------
> Last login: Mon Oct 14 12:37:24 2019 from 192.168.56.1
> 
> haubi@cygwin2019 ~
> $ cmd
> Microsoft Windows [Version 10.0.17763.805]
> (c) 2018 Microsoft Corporation. All rights reserved.
> 
> C:\cygwin64\home\haubi>
> 
> 
----------------------------------------

Actually I do prefer the TERM=dumb behaviour, having the current terminal
buffer content get redrawn at line 1 when cmd is started only, not when
running just Cygwin programs.

My real problem is more sophisticated, and boils down to the creation of some
pty's in a row, each having some commands run inside, and I do expect to see
the output of each command while the series runs and when done, much like:

----------------------------------------
> {some output from previous linux commands}
> {some output}
> {some output}
> haubi@linuxbox ~ $ ssh -t cygwin2016 hostname; hostname; ssh -t cygwin2016 hostname
> cygwin2016
> Connection to cygwin2016 closed.
> linuxbox
> cygwin2016
> Connection to cygwin2016 closed.
> haubi@linuxbox ~ $
----------------------------------------

And looking at the code actually makes me belive that even emacs does have
troubles when the clear screen code is emitted on pty creation...

Thanks!
/haubi/ (in hope that "embedding the screen shots" does work)

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2019-10-14 11:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-22 16:24 Ken Brown
2019-09-24  7:38 ` Michael Haubenwallner
2019-09-24 12:50   ` Ken Brown
2019-09-24 23:05 ` Ken Brown
2019-09-25 18:30   ` Takashi Yano
2019-09-26 12:51     ` Takashi Yano
2019-09-26 14:38       ` Ken Brown
2019-10-02 14:04 ` Michael Haubenwallner
2019-10-02 18:24   ` Ken Brown
2019-10-03 10:44   ` Takashi Yano
2019-10-10 10:44 ` Michael Haubenwallner
2019-10-11  9:25   ` Takashi Yano
2019-10-14 11:07     ` Michael Haubenwallner [this message]
2019-10-16 12:32       ` Takashi Yano
2019-10-18 11:36         ` Takashi Yano
2019-10-16 14:34       ` Takashi Yano
2019-10-16 16:34         ` Michael Haubenwallner

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=99298a9a-5de3-0e14-0128-c693b278f5e7@ssi-schaefer.com \
    --to=michael.haubenwallner@ssi-schaefer.com \
    --cc=cygwin@cygwin.com \
    --cc=takashi.yano@nifty.ne.jp \
    /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).