Red Hat Bugzilla – Bug 128822
should not determine home/end key seq by reading xterm terminfo
Last modified: 2007-11-30 17:10:46 EST
Description of problem:
If TERM is set to "gnome" (to compensate for the differences between
true xterm and gnome-terminal... why xterm's terminfo is not modified
to suit gnome-terminal is left as a reading comprehension exercise in
bug 122815), home/end keys will not be set properly because
gnome-terminal attempts (incorrectly) to deduce them from the xterm entry.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. use latest ncurses, with TERM set to "gnome"
2. do a "less" on a long text file
3. try going to top/bottom of file with home/end
home/end is ignored
home/end move to top and bottom of file
Actually, this is not _really_ a problem since:
-gnome-terminal reads which ESC-sequences to send from the xterm
terminfo entry and since with the latest ncurses xterm = xterm-r6,
there are no ESC-sequences for home and end so gnome-term falls back
to its internal defaults, which are ESC O H and ESC O F, which are
the same as a real xterm and thus correct.
The _real_ problem causing the home and key not working in for example
less is that in the latest ncurses you (Havill) have put ESC [ 1 ~ and
ESC [ 4 ~ in the gnome terminfo entry for the home and end keys, which
are wrong, since gnome-terminal sends ESC O H and ESC O F .
Besides this problem Thomas Dickey has been doing some updates to the
gnome-terminal and konsole descriptions, to make them better match the
current gnome-terminal and konsole and I've also written a few
modifications for the konsole terminfo entry, since Thomas thought
that konsole defaulted to its linux keyboard mode, but it defaults to
its xf86-v4 keyboard mode, which he (Thomas) has acknowledged.
I've rolled all Thomas updates and my fixes for gnome-terminal and
konsole into one patch which is in tar file attached to bug 122815, in
the ncurses-5.4 dir. The ncurses-5.4-20040711 dir in this tar file
contains patches to take ncurses and terminfo to Thomas latest
snapshots (at the time this tar file was made), so you're probably not
interested in this.
There are some _real_ bugs in gnome-terminal where it does not match
xterm, but those belong in a seperate bug report.
I believe this bug can be closed now.