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.
Created attachment 79571 [details, diff] ncurses-terminfo-gnome-rs1.patch
Thomas would be the goto guy for this
@Thomas: is it possible to add this patch upstream for us? Thanks!
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.
Created attachment 85901 [details, diff] ncurses-terminfo-gnome-rs1-rs2.patch Combined patch.
hum, I am running gnome 2.14 and I do not see this issue.
The TERM="gnome" patch got punted. Long-term it's still correct, though.
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).
\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.
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...
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.
I agree - it might do what you want.
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.
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.)
so Thomas, this patch here is correct ?
It's ok. I adapted it (split-out the reusable chunks), and put a copy in ftp://invisible-island.net/ncurses/terminfo.src.gz
5.5-r3 now in portage