From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35457 invoked by alias); 14 Oct 2019 11:07:28 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 35448 invoked by uid 89); 14 Oct 2019 11:07:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=Cygwin, row, emacs, screen X-HELO: atfriesa01.ssi-schaefer.com Received: from atfriesa01.ssi-schaefer.com (HELO atfriesa01.ssi-schaefer.com) (193.186.16.100) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Oct 2019 11:07:26 +0000 Received: from samail03.wamas.com (HELO mailhost.salomon.at) ([172.28.33.235]) by atfriesa01.ssi-schaefer.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Oct 2019 13:07:24 +0200 Received: from [172.28.42.244] by mailhost.salomon.at with esmtp (Exim 4.77) (envelope-from ) id 1iJyCB-0000L0-0s; Mon, 14 Oct 2019 13:07:23 +0200 Subject: Re: [ANNOUNCEMENT] cygwin 3.1.0-0.6 (TEST) To: cygwin@cygwin.com References: <20191011182439.6dd3fedb2c7138627e53c053@nifty.ne.jp> Cc: Takashi Yano From: Michael Haubenwallner Openpgp: preference=signencrypt Message-ID: <99298a9a-5de3-0e14-0128-c693b278f5e7@ssi-schaefer.com> Date: Mon, 14 Oct 2019 11:07:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191011182439.6dd3fedb2c7138627e53c053@nifty.ne.jp> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-10/txt/msg00074.txt.bz2 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 > 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