Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 122566

Summary: ncurses-5.5-r1: terminfo entry "gnome" does not set rs1, does not reset charset in rs2
Product: Gentoo Linux Reporter: Ed Catmur <ed>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: dickey, dickey, eva, mgorny
Priority: High    
Version: 2005.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 91055, 119872    
Attachments: ncurses-terminfo-gnome-rs1.patch
ncurses-terminfo-gnome-rs1-rs2.patch

Description Ed Catmur 2006-02-12 08:28:38 UTC
The terminfo entry for "gnome" does not set rs1. This is needed for reset, etc.

$ infocmp -Ix gnome | grep rs1
$

This will become an issue when gnome-terminal 2.14.x comes out, as it will set TERM="gnome" (dang says so).

Also, the entries for kDN,kDN5,kLFT5 etc. are incorrect, though they aren't used much.

I attach a patch.
Comment 1 Ed Catmur 2006-02-12 08:29:23 UTC
Created attachment 79571 [details, diff]
ncurses-terminfo-gnome-rs1.patch
Comment 2 SpanKY gentoo-dev 2006-02-12 09:58:48 UTC
Thomas would be the goto guy for this
Comment 3 John N. Laliberte (RETIRED) gentoo-dev 2006-03-29 17:59:26 UTC
@Thomas: is it possible to add this patch upstream for us?

Thanks!
Comment 4 Ed Catmur 2006-05-01 03:40:45 UTC
Another problem: rs2 fails to reset the charset.

$ cat /dev/urandom
(prompt turns to garbage)
$ reset               <---typing blind
(screen clears, prompt still garbage)
$ TERM=xterm reset    <---typing blind
(screen clears, prompt now OK)

The difference is that xterm rs2 has <ESC>[!p, which resets the charset. I'll attach a patch to do the same for the gnome entry.
Comment 5 Ed Catmur 2006-05-01 03:41:22 UTC
Created attachment 85901 [details, diff]
ncurses-terminfo-gnome-rs1-rs2.patch

Combined patch.
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2006-06-15 07:23:49 UTC
hum, I am running gnome 2.14 and I do not see this issue.
Comment 7 Ed Catmur 2006-06-15 08:33:25 UTC
The TERM="gnome" patch got punted. Long-term it's still correct, though.
Comment 8 Thomas Dickey 2006-06-20 06:36:47 UTC
The rs1=\Ec, I guess so.

The \E[!p probably not.  Unless GNOME developers start documenting features
of gnome-terminal, there's no easy way to determine which version of the
program the feature applies to (hint: this isn't a "vt220 cursor movement"
string).
Comment 9 Ed Catmur 2006-06-23 14:36:30 UTC
\E[!p has been there since vte got imported into gnome cvs:
http://cvs.gnome.org/viewcvs/vte/src/caps.c?annotate=1.26

I think it's a pretty safe bet that anything out there calling itself gnome supports \E[!p.
Comment 10 Thomas Dickey 2006-06-23 15:48:57 UTC
Perhaps (it may recognize the sequence, but without testing,
(or reading the source code). I wouldn't know if it behaves as
reported.  That particular file only tells gnome-terminal
that it's a known sequence (I can recall when it wasn't ;-).
However, I have a copy of vte-0.11.10 (from 2002) at hand, and
see that sequence is supposed to call vte_terminal_reset() - a table
in src/vte.c - which does something to the iso2022 character settings.
Reading a little further, I note that what it actually does is mostly
incompatible with vt220, but will reset _some_ of the graphics characters,
which is the intent of this bug report...
Comment 11 Ed Catmur 2006-06-24 05:22:03 UTC
Uh, OK. \E[!p was implemented in May 2002:
http://cvs.gnome.org/viewcvs/vte/src/vte.c?r1=1.93&r2=1.94

Still, I don't see how emitting \E[!p for rs2 will break anything.
Comment 12 Thomas Dickey 2006-06-24 05:33:52 UTC
I agree - it might do what you want.
Comment 13 Thomas Dickey 2006-06-24 11:23:26 UTC
hmm - I have a Fedora Core 5, but no GenToo.  However, FC5 has
gnome-terminal 2.14.2, which sets TERM to "xterm".  The first
comment must refer to a GenToo patch.
Comment 14 Ed Catmur 2006-06-24 13:20:57 UTC
Yes. See http://bugs.gentoo.org/show_bug.cgi?id=91055 - once this bug is fixed Gentoo will patch gnome-terminal to set TERM="gnome". Hopefully after that we can get Gnome to do the same. (History: the development 2.13.x ebuilds had the patch, but it was punted from 2.14.x because of this bug.)
Comment 15 SpanKY gentoo-dev 2006-06-24 16:48:29 UTC
so Thomas, this patch here is correct ?
Comment 16 Thomas Dickey 2006-06-25 02:42:37 UTC
It's ok.  I adapted it (split-out the reusable chunks), and put a
copy in ftp://invisible-island.net/ncurses/terminfo.src.gz
Comment 17 SpanKY gentoo-dev 2006-06-26 23:13:22 UTC
5.5-r3 now in portage