Hello! In Debian 9 terminal content is not restored even in xterm. I
work around the problem with the following trick:

In .screenrc I completely removed ti/te:

termcapinfo xterm*|rxvt* 'ti=:te='

I run screen wrapped with tput calls:

tput smcup; screen -S test; tput rmcup

This works quite good except for commands that make screen to write to
terminal like -ls or -Q: the final tput hides the text. So I wrote a
screen wrapper in shell:

#! /bin/sh

if [ "$1" = "-ls" -o "$1" = "--list" ]; then
   list=true
fi

test "$list" = true || tput smcup
/usr/bin/screen "$@"
test "$list" = true || tput rmcup

Now it's near perfect. Tested with rxvt and xterm.

Oleg.
-- 
    Oleg Broytman            https://phdru.name/            p...@phdru.name
           Programmers don't die, they just GOSUB without RETURN.

Reply via email to