Bug 75796

Summary: Backspace and delete are still not properly configured in gnome-terminal
Product: [Retired] Red Hat Linux Reporter: Sebastiano Vigna <sebastiano.vigna>
Component: termcapAssignee: Petr Raszyk <praszyk>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: hp, mitr, nalin
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: termcap-5.4 Rel.6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-20 08:56:26 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:

Description Sebastiano Vigna 2002-10-12 17:41:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020809

Description of problem:
A stock Red Hat 8.0 has gnome-terminal emitting DEL for the Backspace key and an
escape sequence for the Delete key, but the terminfo database entry "gnome"
shipped with the distribution has kbs=^H, i.e., it assumes that Backspace will
emit ^H. This causes all kinds of problems.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Open gnome-terminal, and try to use an application, such ne (the nice editor)
that uses the database correctly. Some application may work if they use the keys
with an intended meaning, but this does not mean that the database is configured
properly. I have written the Backspace/Delete Mini-HOWTO about the matter.

For instance, try

KBS=$(tput kbs)
if [ ${#KBS} -eq 1 ]; then stty erase $KBS; fi

This should set correctly the erase character *in all cases*, but after this
backspace and delete will do the same, instead, as the database returns wrong
information.

Additional info:

I know that I can change the behaviours of the key, but the problem is that an
*off-the-shelf* distribution is not configured properly!

Comment 1 Havoc Pennington 2002-10-12 17:53:58 UTC
gnome-terminal settings are right, maybe the terminfo/termcap stuff is wrong.


Comment 2 Miloslav Trmac 2002-10-12 20:33:32 UTC
My off-the-shelf 8.0 distribution has TERM=xterm inside gnome-terminal.
BTW, I thought bero is not here to handle this bug anymore?

Comment 3 Havoc Pennington 2002-10-12 22:01:14 UTC
Right, I don't know if TERM=gnome is ever used.

Bero's packages/bugs will get reassigned at some point, just hasn't been done yet.

Comment 4 Sebastiano Vigna 2002-10-13 07:32:52 UTC
I realise that a stock distribution has xterm as the terminal for
gnome-terminal. 

However, why ever there is a gnome entry and it does not
correspond to the standard settings for gnome-terminal? I am trying to have my
settings work on several machines and also to be consistent when I move between
machines with ssh, but in this way it is not easy... historically, the keyboard
setting of gnome-terminal and xterm has not always be aligned, and having two
entries helps.


Comment 5 Petr Raszyk 2005-09-20 08:56:26 UTC
Fixed in FEDORA CORE 4 (using termcap-5.4 Rel.6).

termcap-5.4 Rel.6 added on Mon Sep  5 10:55:07 CEST 2005 
(FEDORA CORE 4).

After this update termcap-values/terminfo-values for delete-key
and backspace key (xterm/gnome) are synchronized.

terminfo -> xterm -> backspace-key -> kbs=\177 
termcap  -> xterm -> backspace-key -> kb=\177
terminfo -> xterm -> delete-key    -> kdch1=\E[3~
termcap  -> xterm -> delete-key    -> kD=\E[3~

terminfo -> gnome -> backspace-key -> kbs=\177 
termcap  -> gnome -> backspace-key -> kb=\177
terminfo -> gnome -> delete-key    -> kdch1=\E[3~
termcap  -> gnome -> delete-key    -> kD=\E[3~

xterm-emulator and gnome-emulator really emit these keys.

Default 'stty erase' setting for xterm is  ^?  (== 0177).
Default 'stty erase' setting for gnome is  ^?  (== 0177).

The same above, xterm/gnome emits 0177 after pressing
backspace-key.