Bug 75796 - Backspace and delete are still not properly configured in gnome-terminal
Backspace and delete are still not properly configured in gnome-terminal
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: termcap (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Petr Raszyk
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-12 13:41 EDT by vigna
Modified: 2007-04-18 12:47 EDT (History)
3 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description vigna 2002-10-12 13:41:33 EDT
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 13:53:58 EDT
gnome-terminal settings are right, maybe the terminfo/termcap stuff is wrong.
Comment 2 Miloslav Trmac 2002-10-12 16:33:32 EDT
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 18:01:14 EDT
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 03:32:52 EDT
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 04:56:26 EDT
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.

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