I've got a problem that I haven't been able to resolve on my own.  Midnite
Commander (mc) displays correctly with my telnet client.  However, if I load
'screen' (see below) first, I get massive text screen corruption.  Something
related to cursor control seems to be amiss in "screen"'s video layer.

I am telnetting (from Win2000) into my box from a remote connection.  From
there I'm doing massive file copies from a NAS (a Quantum Snap! Server) hard
drive to the Mandrake box's own drive.  Because the directory structure is
mixed and the speed of the connection between the Linux box and NAS is slow
(20, I'm using Midnite Commander to tag directories for transfer.  I tag a
bunch of directories and it could take 5 or 6 hours to transfer the data.  I
need to take my Win2000 laptop from the worksite every nite and the transfer
may not be finished.  I remembered a virtual terminal/shell program called
"screen" to allow me to detach the session and leave it running.  That way I
could connect at will to the Linux box and check the progress of the
transfer.

Everything is fine if I only run mc with telnet.  Linux correctly identifies
the default W2k telnet client as an ANSI terminal complete with color.
Loading "screen" alone also works.  I can't even tell that I loaded it (if
you've ever used it, you know what I mean) unless I start using the virtual
terminal's key commands.  

Loading mc in a "screen" session is going screwy.  By default, mc thinks it
is on a b&w terminal.  I can force color with a command line switch and then
color works.  In either case, the initial screen displays the first 6 or 7
lines correctly, then overprints then next 43 (I'm running a 100x50 telnet
session) on the eighth line.  If I cursor down, the real text for the line
in the left or right pane clean up, but the screen is generally a mess.  If
I shut down mc, the popup confirmation box displays correctly in the exact
center of the terminal (could this mean my problem is related to printing at
the right edge of the terminal?).

Things I've tried:
- using the refresh command in "screen": First line prints correctly, and
then the remaining lines are all offset by 2 characters to the left as if
someone hit "delete" twice on the second line, causing all subsequent
characters to wrap around.

- using -a or -A option in screen to force either advanced or simple screen
control: no effect

- tried every command line switch related to display in mc: no effect.

I think it has to do with terminal definition sources.  I think mc gets it's
info from the etc directory whereas "screen" creates a TERMCAP variable to
define its new virtual terminal.

Any ideas are welcome.  I'm now halfway proficient in Linux but don't have a
clue as to how all this terminal stuff works.  Any pointers to simple
explanations of the terminal concept in Linux would also be appreciated.

I've included the TERM and TERMCAP entries that are defined when "screen" is
running, since I think this might be the problem.


TERM=screen
TERMCAP='SC|screen|VT 100/ANSI X3.64 virtual terminal:\
        :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
        :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
        :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
        :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
        :li#50:co#100:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\
        :dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:im=\E[4h:ei=\E[4l:\
        :mi:IC=\E[%d@:ks=\E[?1h\E=:ke=\E[?1l\E>:vi=\E[?25l:\
        :ve=\E[34h\E[?25h:vs=\E[34l:us=\E[4m:ue=\E[24m:so=\E[3m:\
        :se=\E[23m:mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\
        :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
        :as=\E(0:ae=\E(B:\
 
:ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\
        :po=\E[5i:pf=\E[4i:k0=\E[10~:k1=\EOP:k2=\EOQ:k3=\EOR:\
        :k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:\
        :k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:kb=^H:kB=\E[Z:\
        :kh=\E[1~:kH=\E[4~:kN=\E[6~:kP=\E[5~:kI=\E[2~:kD=\E[3~:\
        :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:'



TIA,
Matthew Zaleski


Reply via email to