Bug 115448

Summary: ncurses-5.4 missing escape charactes
Product: [Fedora] Fedora Reporter: Sammy <umar>
Component: ncursesAssignee: Eido Inoue <havill>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: aleksey, bnocera, dickey, gbpeck, gczarcinski, icon, jlaska, kajtzu, leonard-rh-bugzilla, me, mitr, moritz, oliva, rh-bugzilla, tmwg
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.4-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-25 23:29:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 114961    
Attachments:
Description Flags
Modified xterm patch for ncurses-5.4 none

Description Sammy 2004-02-12 16:58:52 UTC
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):
ncurses-5.4-1

How reproducible:
Always

Steps to Reproduce:
1.install ncurses-5.4-1
2.edit file with vim and try to do some searches
3.
    

Additional info:

Comment 1 Eido Inoue 2004-02-12 19:02:10 UTC
I'm not seeing this on Fedora Core in the en_US.UTF-8 locale or the
ja_JP.UTF-8 locale


Comment 2 Sammy 2004-02-12 19:12:31 UTC
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 
like: 
 
^[36m^[44mopenoffice.org-1.1.0-27 
^[36m^[44mopenoffice.org-i18n-1.1.0-27 
^[36m^[44mopenoffice.org-libs-1.1.0-27 
 
Is there anything I need to change? When I use ncurses-5.3-10 it 
shows fine. 
 

Comment 3 Eido Inoue 2004-02-12 20:01:51 UTC
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:

export TERM=gnome-rh90

before doing vim should work

accepting bug


Comment 4 Sammy 2004-02-12 20:32:29 UTC
I am actually using kde konsole. The $TERM seems to be 
set to xterm. 

Comment 5 Eido Inoue 2004-02-12 20:38:29 UTC
then setting the TERM to "konsole" should work


Comment 6 Sammy 2004-02-12 21:20:26 UTC
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. 

Comment 7 Eido Inoue 2004-02-13 20:33:32 UTC
with respect to /etc/DIR_COLORS in comment 6, adding both "TERM
gnome-rh90" and "TERM konsole" (and TERM xtermc unless you use
xterm-color).

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.


Comment 8 Sammy 2004-02-13 21:20:23 UTC
Created attachment 97662 [details]
Modified xterm patch for ncurses-5.4

Modified xterm patch for ncurses-5.4

Comment 9 Sammy 2004-02-13 21:20:37 UTC
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. 
Thanks 

Comment 10 Moritz Barsnick 2004-02-14 12:41:10 UTC
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.)

Comment 11 Bill Nottingham 2004-02-16 07:09:55 UTC
*** Bug 115671 has been marked as a duplicate of this bug. ***

Comment 12 Bill Nottingham 2004-02-16 07:10:00 UTC
*** Bug 115616 has been marked as a duplicate of this bug. ***

Comment 13 Aleksey Nogin 2004-02-20 03:56:05 UTC
Re: comment #5

> then setting the TERM to "konsole" should work

If I do, then tcsh complains. Filed bug 116330 on that one.

Comment 14 Thomas E. Dickey 2004-02-20 20:59:07 UTC
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
at it).

Comment 15 Moritz Barsnick 2004-02-24 17:24:36 UTC
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 
TERM variable.

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
c) ...

Comment 16 Thomas E. Dickey 2004-02-24 23:54:32 UTC
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.

Comment 17 Eido Inoue 2004-02-25 19:45:59 UTC
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.

Comment 18 Eido Inoue 2004-02-25 20:49:53 UTC
*** Bug 115499 has been marked as a duplicate of this bug. ***

Comment 19 Eido Inoue 2004-02-25 23:28:41 UTC
*** Bug 116705 has been marked as a duplicate of this bug. ***

Comment 20 Leonard den Ottolander 2004-02-26 11:43:04 UTC
Could this bug and all it's duplicates be versioned correctly? I
believe we are speaking of FC 2 test 1 here.


Comment 21 Bastien Nocera 2004-02-26 12:16:17 UTC
Yes, I'm reopening 115499 as it's against FC2 now.
This bug is closed and against FC1 test 3.

Comment 22 Leonard den Ottolander 2004-02-26 12:45:07 UTC
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 23 Eido Inoue 2004-02-26 17:01:39 UTC
comment 22: fixing

Comment 24 Thomas E. Dickey 2004-02-28 21:16:48 UTC
"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.