Bug 75796 - Backspace and delete are still not properly configured in gnome-terminal
Summary: Backspace and delete are still not properly configured in gnome-terminal
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: termcap   
(Show other bugs)
Version: 8.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Petr Raszyk
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-10-12 17:41 UTC by vigna
Modified: 2007-04-18 16:47 UTC (History)
3 users (show)

Fixed In Version: termcap-5.4 Rel.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-20 08:56:26 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description 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:

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

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 vigna 2002-10-13 07:32:52 UTC
I realise that a stock distribution has xterm as the terminal for

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 

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

Note You need to log in before you can comment on or make changes to this bug.