This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Workaround to screen writing over restored buffer on detach/exit


So I've had an issue with screen for some years now. I do remember
noticing its introduction, but I no longer can remember when that
actually happened.

As per the subject, I find that when I detach or exit a screen session
the cursor ends up part way up the restored buffer, intermingled with
previous lines.

I'd resolved to try and get to the bottom of it ages ago, but lost the
initiative too easily. I noticed from ages ago that the terminal window
title bar would flash this message:

Utmp slot not found -> not removed

And this didn't surprise me, as I wouldn't expect Cygwin to have
conventional utmp implementation. But it looks like screen sending
xterm control sequences for this additional message (on detach/exit, a
final restoration of your buffer involves updating the terminal title
with previous message) causes havoc with the screen session.

I confirmed this by turning off the default "login" mode for a new
session, which averted attempts to manage utmp entries, and therefore
avoided the "utmp slot not found" message. I did this by launching a
session via:

screen -ln

You can also set login off in your .screenrc.

Doing this, screen session plays nicely now. Probably, the error in utmp
should be actually fixed, or permanently turned off if not workable in
Cygwin. But for now, I'm so relieved to be able to workaround a daily
pain in the proverbial.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]