Bug 126855 - backspace does not work in less
Summary: backspace does not work in less
Alias: None
Product: Fedora
Classification: Fedora
Component: xterm
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact:
Depends On:
Blocks: FC4Target
TreeView+ depends on / blocked
Reported: 2004-06-28 13:51 UTC by Stuart Children
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2005-03-08 22:15:07 UTC

Attachments (Terms of Use)

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

How reproducible:

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:

Expected Results:  The prompt should have been:

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


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

fixes most of the issues."


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.

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