public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* xterm + mc problem: messed up output when running commands
       [not found] <3ca7721c1001071332p365365eeo80461caaf001c9ab@mail.gmail.com>
@ 2010-01-07 21:37 ` Andrew Zhezherun
  2010-01-07 23:30   ` Andy Koppe
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Zhezherun @ 2010-01-07 21:37 UTC (permalink / raw)
  To: cygwin-xfree

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 3054 bytes --]

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
\x16º&s(0Š|_­ç«zÛ«Ÿot×™b²Ö«r\x172ƒ\b§ÅúÞ

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: xterm + mc problem: messed up output when running commands
  2010-01-07 21:37 ` xterm + mc problem: messed up output when running commands Andrew Zhezherun
@ 2010-01-07 23:30   ` Andy Koppe
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Koppe @ 2010-01-07 23:30 UTC (permalink / raw)
  To: cygwin-xfree

2010/1/7 Andrew Zhezherun:
> 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.
> [...]

I find that mc immediately switches back to the folder view. How do
you keep it on the screen? If I add a 'sleep 3' after the cat, I see
that the lines are arranged as intended, without the staircase effect.

The carriage return after the newline is normally added by the pseudo
terminal driver. This is controlled by the stty onlcr setting.

Andy

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-07 23:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3ca7721c1001071332p365365eeo80461caaf001c9ab@mail.gmail.com>
2010-01-07 21:37 ` xterm + mc problem: messed up output when running commands Andrew Zhezherun
2010-01-07 23:30   ` Andy Koppe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).