From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88341 invoked by alias); 10 Apr 2019 20:03:29 -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 86984 invoked by uid 89); 10 Apr 2019 20:03:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_50,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=osc, Normal, helping, baddah X-HELO: smtp-nf-201.his.com Received: from smtp-nf-201.his.com (HELO smtp-nf-201.his.com) (216.194.196.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Apr 2019 20:03:26 +0000 Received: from cuda201.his.com (cuda201.his.com [216.194.196.22]) by smtp-nf-201.his.com (Postfix) with ESMTPS id C5040607E4 for ; Wed, 10 Apr 2019 16:03:24 -0400 (EDT) Received: from smtp-nf-202.his.com (smtp-nf-202.his.com [216.194.196.20]) by cuda201.his.com with ESMTP id mNNVoleMe9RzCjMy; Wed, 10 Apr 2019 16:03:24 -0400 (EDT) Received: from zproxy101.his.com (zproxy101.his.com [18.218.2.49]) by smtp-nf-202.his.com (Postfix) with ESMTPS id 429D0601D3; Wed, 10 Apr 2019 16:03:24 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by zproxy101.his.com (Postfix) with ESMTP id 1BB3C17869B; Wed, 10 Apr 2019 16:03:24 -0400 (EDT) Received: from zproxy101.his.com ([127.0.0.1]) by localhost (zproxy101.his.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id RWhwv9WVuDYo; Wed, 10 Apr 2019 16:03:24 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by zproxy101.his.com (Postfix) with ESMTP id 035261790EC; Wed, 10 Apr 2019 16:03:24 -0400 (EDT) Received: from zproxy101.his.com ([127.0.0.1]) by localhost (zproxy101.his.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id iK-FSzaz8vTS; Wed, 10 Apr 2019 16:03:23 -0400 (EDT) Received: from mb1.his.com (mb1.his.com [10.0.1.101]) by zproxy101.his.com (Postfix) with ESMTP id D35361790EB; Wed, 10 Apr 2019 16:03:23 -0400 (EDT) Date: Wed, 10 Apr 2019 20:03:00 -0000 From: Thomas Dickey To: Shaddy Baddah Cc: cygwin Message-ID: <1919747550.7813512.1554926603758.JavaMail.zimbra@his.com> In-Reply-To: References: <1554907871.14124.ezmlm@cygwin.com> Subject: Re: *cause of* screen writing over restored buffer on detach/exit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-04/txt/msg00084.txt.bz2 ----- Original Message ----- | From: "Shaddy Baddah" | To: "cygwin" | Sent: Tuesday, April 9, 2019 11:18:19 PM | Subject: Re: *cause of* screen writing over restored buffer on detach/exit | On 9/4/19 4:07 pm, Shaddy Baddah wrote: |> |> This helped with screen when using Putty to a Cygwin ssh session. For |> some reason, it isn't helping for running screen locally in a mintty |> session. And it's not mintty either, because I can ssh to a Debian |> stretch server within mintty and I can use its screen without this |> issue happening. Back to the drawing board for me. | | I understand the cause of the issue now, by capturing and comparing the | escape characters used to control the terminal by screen on Cygwin and | Debian. | | It is not so much the detach/exit is the issue, although the escape | sequence for Cygwin includes a couple of extra xterm OSC Set Text | Parameters -> Change Icon Name and Window Title outputs. I misdiagnosed | this somehow. I can suppress the extra utmp error one of these OSC | outputs, but it didn't/doesn't really make a difference. | | The issue is in the escape sequences sent to the terminal by Cygwin | screen to switch to new windows buffer, as compared to Debian. | | Debian uses xterm sequence DECSET / ESC[?1049h in the switch to the new | window. Cygwin uses the two sequences ESC7 / Save Cursor (DECSC) and | ESC[?47l / DEC Private Mode Reset (DECRST) -> Use Normal Screen Buffer. | | | The reason seems to be that the Debian screen package packages a custom | /etc/screenrc that does not include this explicit term capability: | | | # | # Do not use xterms alternate window buffer. | # This one would not add lines to the scrollback buffer. | termcap xterm|xterms|xs ti=\E7\E[?47l | terminfo xterm|xterms|xs ti=\E7\E[?47l | | | | If I comment these out, my screen issue is resolved. | | I'm not suggesting this is a problem with Cygwin screen... it is using | the upstream settings. In fact, I am not confident to say where the | fault lies. Perhaps screen is right to use these sequences, but the | xterms used (putty and mintty) aren't doing the right thing? yes - that's one of a half-dozen cases where PuTTY has never matched xterm's behavior. -- Thomas E. Dickey http://invisible-island.net ftp://ftp.invisible-island.net -- 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