X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=fKS At+h2ZWc7NUqJUOLwGbCGTA7tqiQYPgM1HbcRiS1/HFHcTDfI/txI8wO399PoHsf LL/uuvbsyWsvbWLThg+jqcz2UEvjnEupl4KbmYrmV02PVZs5Gh8hHZC9il+Hqoaj k3xwzqJty40k43y1bqMUII6UKcn1cdIcAMpUzReY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type:content-transfer-encoding; s=default; bh=dEfImAZ29 rf6bN4cVtLpfbiKtfI=; b=ZMIwBqD9fDp+bUE85vrwfWczI1ylbJ8hWNZwK9nEG nlmMGZ/ibSr2qmFNUcP6vP8KPme5oxhdu89LiNPog30VF9COVfokT8KJ1jMROzSo 6uS56ZGfduiOwN9RjzNDAvbeMM6PuzOXUn/tAzQHGdcDCoQ++kJEig8BcNOtxGn0 2Y= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL autolearn=no version=3.3.1 spammy=screen, avoided, detach, permanently X-HELO: nsstlmta34p.bpe.bigpond.com To: cygwin AT cygwin DOT com From: Shaddy Baddah Subject: Workaround to screen writing over restored buffer on detach/exit Message-ID: <56fced2e-4f98-7bba-136b-5eeded34ce6f@shaddybaddah.name> Date: Tue, 9 Apr 2019 15:37:00 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Hi, 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. -- Regards, Shaddy -- 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