Bug 128822

Summary: should not determine home/end key seq by reading xterm terminfo
Product: [Fedora] Fedora Reporter: Eido Inoue <havill>
Component: gnome-terminalAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: hdegoede
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-07-30 14:38:19 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: 122815    

Description Eido Inoue 2004-07-30 01:31:06 UTC
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):
2.6.0-2

How reproducible:
always

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
  
Actual results:
home/end is ignored

Expected results:
home/end move to top and bottom of file

Comment 1 Hans de Goede 2004-07-30 06:28:45 UTC
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.