Bug 126855

Summary: backspace does not work in less
Product: [Fedora] Fedora Reporter: Stuart Children <stuart>
Component: xtermAssignee: Mike A. Harris <mharris>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dickey, leonard-rh-bugzilla
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: 2005-03-08 22:15:07 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: 136451    

Description Stuart Children 2004-06-28 13:51:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
When using less in an xterm (either directly, or as a pager for man)
and trying to enter some text (eg: a search string), backspace does
not work - ^H is printed instead.

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

How reproducible:
Always

Steps to Reproduce:
1. start xterm
2. execute `less /var/log/dmesg`
3. type '/' to enter a search string
4. type in 'redhat', then press backspace
   

Actual Results:  The prompt now says:
/redhat^H

Expected Results:  The prompt should have been:
/redha

Additional info:

The following X resource fixes this bug for me:

xterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n

I've not noticed any detrimental effects of this so far.

Comment 1 Thomas E. Dickey 2004-06-28 21:39:15 UTC
There are several possible ways to fix this; the one
listed is one of the ones I wouldn't recommend.  (Since
xterm's users are evenly split on what "backspace" should
send, it's up to the packager to make it consistent).

Comment 2 Leonard den Ottolander 2004-08-10 13:45:58 UTC
I am also seeing this when using man in an xterm (192-1). By the way,
is this an xterm, a less or a termcap issue?


Comment 3 Ruben van Royen 2005-01-21 11:38:23 UTC
As far is I understand correctly, from amongst others, this thread:
https://www.redhat.com/archives/fedora-devel-list/2004-December/msg00503.html
Fedora follows the debian backspace configuration. As far as I can
tell, since Fedora Core 3, some errors have been introduced with
respect to this. I see two bugs:
1) xterm sends ^H instead of ^? by default, konsole and gnome-terminal
are correct.
2) termcap/info for xterm is incorrect, "tput kbs | cat -v  ;echo"
gives ^H instead of ^?. 
Note that these two seem to be compatible, but for some reason, the
terminfo is not automatically used in the stty setting of the terminal
(used to be done in bashrc, not since FC2?).


Comment 4 Leonard den Ottolander 2005-01-25 23:09:00 UTC
According to Enrico Scholz:

"I think the current misbehavior of xterm is caused by

| * Fr Jun 18 2004 Mike A. Harris <mharris redhat com> 191-1
| - Disabled xterm-resources-redhat.patch to see what if anything breaks"

"Using

| XTerm.ttyModes:         erase ^?
| XTerm*metaSendsEscape:  true

fixes most of the issues."

https://www.redhat.com/archives/fedora-devel-list/2004-December/msg00497.html


Comment 5 Thomas E. Dickey 2005-01-31 00:03:49 UTC
The cited thread says Fedora is following Debian's guidelines.
However, Debian patches the XTerm app-defaults file, e.g.,
it adds these lines (as well as modifying the terminfo file):

! Debian package customizations follow. 
*backarrowKeyIsErase: true
*ptyInitialErase: true

Moral: you can't follow the Debian guidelines without patches.

Comment 7 Mike A. Harris 2005-03-09 16:39:21 UTC
The xterm-resources patch was updated in the latest xterm build
for rawhide.