Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 122566 - ncurses-5.5-r1: terminfo entry "gnome" does not set rs1, does not reset charset in rs2
Summary: ncurses-5.5-r1: terminfo entry "gnome" does not set rs1, does not reset chars...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 91055 119872
  Show dependency tree
 
Reported: 2006-02-12 08:28 UTC by Ed Catmur
Modified: 2006-06-26 23:13 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ncurses-terminfo-gnome-rs1.patch (ncurses-terminfo-gnome-rs1.patch,484 bytes, patch)
2006-02-12 08:29 UTC, Ed Catmur
Details | Diff
ncurses-terminfo-gnome-rs1-rs2.patch (ncurses-terminfo-gnome-rs1-rs2.patch,609 bytes, patch)
2006-05-01 03:41 UTC, Ed Catmur
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 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