[CentOS] Gnu Screen - terminal issues

Thu Mar 3 21:34:25 UTC 2011
Dr. Ed Morbius <dredmorbius at gmail.com>

on 13:36 Thu 03 Mar, Sean Carolan (scarolan at gmail.com) wrote:
> I really like gnu screen and use it everyday but there's one thing
> that is a bit inconvenient, and that's the odd line wrapping and
> terminal size issues that seem to pop up.  The problem crops up when I
> type or paste a really long command, and then go back and try to edit
> it; the text starts to wrap over itself and you have no idea what you
> are editing.  Any fixes for this?

Is your local terminal type known to all remote systems (in termcap)?

I find I have to re-map $TERM to some low-common standard (e.g.: xterm)
on many systems.  Legacy Unix vendors being the most eggregious for
this.

You can test $TERM compatibility in your shell login:

    tput -T $TERM init >/dev/null 2>&1 && echo yes || echo no

In this case, you might want to conditionally assign some reasonable
value on failure.  Say:

    tput -T $TERM init >/dev/null 2>&1 || export TERM=xterm

'tset -q' is another test which can be used.

-- 
Dr. Ed Morbius, Chief Scientist /            |
  Robot Wrangler / Staff Psychologist        | When you seek unlimited power
Krell Power Systems Unlimited                |                  Go to Krell!