From: Thomas Dickey <dickey@his.com>
To: Shaddy Baddah <lithium-cygwin@shaddybaddah.name>
Cc: cygwin <cygwin@cygwin.com>
Subject: Re: *cause of* screen writing over restored buffer on detach/exit
Date: Wed, 10 Apr 2019 20:03:00 -0000 [thread overview]
Message-ID: <1919747550.7813512.1554926603758.JavaMail.zimbra@his.com> (raw)
In-Reply-To: <b0290101-3511-9ffb-91d3-e88afdbe9df1@shaddybaddah.name>
----- Original Message -----
| From: "Shaddy Baddah" <lithium-cygwin@shaddybaddah.name>
| To: "cygwin" <cygwin@cygwin.com>
| 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 <dickey@invisible-island.net>
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
next prev parent reply other threads:[~2019-04-10 20:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 5:37 Workaround to " Shaddy Baddah
2019-04-09 6:07 ` *spoke to soon to a* " Shaddy Baddah
2019-04-10 3:18 ` *cause of* " Shaddy Baddah
2019-04-10 15:04 ` Andrew Schulman
2019-04-10 17:12 ` Thomas Wolff
2019-04-11 12:12 ` Andrew Schulman
2019-04-11 17:24 ` Thomas Wolff
2019-04-10 20:03 ` Thomas Dickey [this message]
2019-04-10 21:51 ` Thomas Wolff
2019-04-11 23:06 ` Thomas Dickey
2019-04-11 23:50 ` Thomas Dickey
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=1919747550.7813512.1554926603758.JavaMail.zimbra@his.com \
--to=dickey@his.com \
--cc=cygwin@cygwin.com \
--cc=lithium-cygwin@shaddybaddah.name \
/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).