Red Hat Bugzilla – Bug 115448
ncurses-5.4 missing escape charactes
Last modified: 2007-11-30 17:10:36 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux; X11; en_US, en) (KHTML, like Gecko)
Description of problem:
After installing ncurses-5.4-1 certain escape characters start to
show when editing files with vim. I think this happened when we
did the last major upgrade and had to do with xterm escape
characters or something like that, which was fixed later on.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
2.edit file with vim and try to do some searches
I'm not seeing this on Fedora Core in the en_US.UTF-8 locale or the
Well, I presume I am using en_US since I have everything from
todays development tree.
Just vi a text file and search a string, the highlight stuff is showing
Is there anything I need to change? When I use ncurses-5.3-10 it
I see-- you're using gnome-terminal and not the console.
The TERM is set wrong for newer gnome-terminal. Not sure if I want to
repatch ncurses to make xterm behave like gnome-terminal.
As a workaround, setting:
before doing vim should work
I am actually using kde konsole. The $TERM seems to be
set to xterm.
then setting the TERM to "konsole" should work
This worked for vi BUT then I lost my DIR_COLORS for ls. Looking
into this coreutils-5.0 brings many things that use xterm and
/etc/DIR_COLORS.xterm, so it would be nice if one can implement
the xterm stuff into the ncurses.
with respect to /etc/DIR_COLORS in comment 6, adding both "TERM
gnome-rh90" and "TERM konsole" (and TERM xtermc unless you use
I'm currently experimenting with the pros and cons of being "correct"
(real xterm does not support colors) vs the traditional hacked/patched
convenience version of xterm from the past.
If we go with the pedanticly correct xterm then the default TERM will
have to be modified, along with DIR_COLORS.
Created attachment 97662 [details]
Modified xterm patch for ncurses-5.4
Modified xterm patch for ncurses-5.4
In the mean time I have modified the old patch and rebuilt the
rpm. It is working fine. I'll attach the patch. I'll use this unless
I hear otherwise.
I can confirm that ncurses-5.4 leaves mutt and lynx uncolored in
gnome-terminal (TERM=xterm, which seems to be the default).
OTOH, gnome-terminal is missing documentation as where to have it set
its TERM variable, and vte is quite undocumented. ;-) (Setting it in
bashrc is a hack, IMHO.)
*** Bug 115671 has been marked as a duplicate of this bug. ***
*** Bug 115616 has been marked as a duplicate of this bug. ***
Re: comment #5
> then setting the TERM to "konsole" should work
If I do, then tcsh complains. Filed bug 116330 on that one.
Updating termcap shouldn't be that hard (I generate one from
terminfo periodically as I update that). But I guess that's
a different package.
The last I knew, gnome-terminal had no provision for setting
$TERM to anything but "xterm" (recent look at the source).
Ditto konsole (but it's been a little longer since I looked
Hi dickey (T.E., I assume? bugzilla says you're "Need Real Name" ;->)
is it true that if gnome-terminal sets "xterm" (and _only_ this),
that it then should behave that way? Or at least as the
well-respected, but not compatible/identical xterm-color? Does it
perhaps do so? I guess it should provide its own proper termcap and
terminfo, if not...
ncurses seems to (correctly) obey its xterm (!= xterm-color!)
setting, and is therefore uncolored.
BTW, multi-gnome-terminal does indeed accept an argument to set its
Another BTW: some programs complain about "gnome-rh9", probably
because it's only in termcap and not terminfo (or vice versa).
Should I file more bugs? ;-)
a) gnome-terminal sets TERM incorrectly
b) gnome-rh9 is not implemented correctly/completely
yes (t.e.). less typing is better...
I'm guessing that some application is deciding that the
escape sequences aren't going to be displayed, and "fixing"
it by displaying them in printable form. I suggested that
the reporter might be using "screen" (but didn't see any
discussion of this). gnome-terminal doesn't provide its own
terminfo/termcap (but I did add a "gnome" to ncurses's terminfo).
I hadn't noticed anyone mentioning "gnome-rh9" before. It's
not in my copy of Redhat9 (I see a gnome-rh62, gnome-rh72).
However - rereading the thread, it sounds as if gnome-terminal is
at fault. Echoing escape sequences at that level is always a bug.
gnome-terminal in the past has done this in several places, so
I wouldn't find that surprising. It would be nice if someone
took the time to fix gnome-terminal.
I was the person that said "gnome-rh9". It's in the terminfo.src and
reflects the newest vte (component of gnome-terminal).
Also, "gnome" exists, and it currently points to "gnome-rh9",
suggesting that "gnome" always points to the newest version. I'd
recommend using "gnome" over "gnome-rh9".
As for the echoing of escape sequences in printable form, it seems
that only vim does this. I'm not sure why yet. Still investigating.
*** Bug 115499 has been marked as a duplicate of this bug. ***
*** Bug 116705 has been marked as a duplicate of this bug. ***
Could this bug and all it's duplicates be versioned correctly? I
believe we are speaking of FC 2 test 1 here.
Yes, I'm reopening 115499 as it's against FC2 now.
This bug is closed and against FC1 test 3.
How can this bug be against FC1 test 3?? FC 1 was released months ago.
As ncurses 5.4 is in FC 2 test 1 this should be retagged to FC 2 test
1 and so should the duplicates.
comment 22: fixing
"gnome-rh90" is in my source, not "gnome-rh9" (but it was
late, and I was looking at my copy of Redhat 9 which of
course had neither.