Bug 126855 - backspace does not work in less
backspace does not work in less
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: xterm (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
:
Depends On:
Blocks: FC4Target
  Show dependency treegraph
 
Reported: 2004-06-28 09:51 EDT by Stuart Children
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-08 17:15:07 EST
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 Stuart Children 2004-06-28 09:51:43 EDT
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 17:39:15 EDT
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 09:45:58 EDT
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 06:38:23 EST
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 18:09:00 EST
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-30 19:03:49 EST
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 11:39:21 EST
The xterm-resources patch was updated in the latest xterm build
for rawhide.

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