xterm + mc problem: messed up output when running commands

Andrew Zhezherun zhezherun@gmail.com
Thu Jan 7 21:37:00 GMT 2010


Hi All,

I have a weird problem with the latest Cygwin 1.7. It happens with
both a fresh install on a Windows 7 machine and with an upgraded
install of Cygwin on a Windows XP machine. When I execute various
commands from Midnight Commander when it is running under Cygwin/X
xterm, e.g. cat, the lines are printed with an offset. For example,
when I run

cat /etc/X11/app-defaults/XTerm

I get the following output on the screen:

-----------------------------------------------------------------
       ! VT100s and similar terminals recognize escape sequences
and control
           ! characters to which they reply to the host with othe
r escape sequences,
                   ! to provide information.  The "resize" progra
m uses this feature.
                    !
                     ! In addition, xterm recognizes several esca
pe sequences which can be used to
                                 ! set fonts, window properties,
return settings via escape sequences.  Some
                                           ! find these useful; o
thers are concerned with the possibility of unexpected
                                                      ! inputs.
                                                               !
                                                                !
 All of these features can be enabled or disabled via menus.
                                                            !
                                                             ! De
pending on your environment, you may wish to disable those by def
ault by
       ! uncommenting one or more of the resource settings below:
                                                                !
*allowFontOps: false
                    !*allowTcapOps: false
                                         !*allowTitleOps: false
                                                               !*
allowWindowOps: false
-----------------------------------------------------------------

It looks as if cat does not do carriage return when moving to the next
line, only line feed, so subsequent lines become all indented. If I
exit mc, however, and run cat from bash, it operates normally. If I
run mc under the Cygwin shell (non-X), everything also works as
expected. Also note that when I ssh from Cygwin xterm onto a linux
host and then run mc remotely in this session, cat-ing from it also
works normally. So the problem seems to be in the combination of xterm
+ local mc and occurs when running any command from inside mc.

I suspect that some information about the terminal is not properly
handled by mc, but I do not know where to look. Any ideas what is
happening here?

Thank you,
Andrew


More information about the Cygwin-xfree mailing list