Bug 147822

Summary: rxvt, xterm backdpace key is incorrect
Product: [Fedora] Fedora Reporter: patrick
Component: ncursesAssignee: Eido Inoue <havill>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: hdegoede
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-02-11 20:36:33 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:

Description patrick 2005-02-11 17:42:25 UTC
Description of problem:
The terminfo database for rxt (and xterm) is incorrect, the backspace
definition is incorrect

Version-Release number of selected component (if applicable):
ncurses-5.4-13 (and all previous versions I have used)

How reproducible:
Always

Steps to Reproduce:
Open and rxvt terminal or konsole and presumably an xterm (which I
dont have and didn't test). Start a perl interpreter. Type something,
press the backspace key, instead of deleting the content a ^? appears

Problems also appear with many other applications including remote
logging in to a FreeBSD machine and using vi. The version of vi on fc3
appears to work fine.

Additional info:

The terminfo variable kbs should be changed from
kbs=^H
to
kbs=^?

This is my full terminfo decompiled file:
#       Reconstructed via infocmp from file: /home/pim/.terminfo/r/rxvt
rxvt|rxvt terminal emulator (X Window System), 
        am, bce, eo, km, mir, msgr, xenl, xon, 
        colors#8, cols#80, it#8, lines#24, ncv@, pairs#64, 
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, 
        clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M, 
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 
        cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, 
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, 
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, 
        el=\E[K, el1=\E[1K, enacs=\E(B\E)0, flash=\E[?5h\E[?5l, 
        home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, 
        ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, 
        is1=\E[?47l\E=\E[?1l, 
        is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, 
        kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kLFT=\E[d, kNXT=\E[6$, 
        kPRV=\E[5$, kRIT=\E[c, ka1=\EOw, ka3=\EOy, kb2=\EOu, 
        kbs=\177, kc1=\EOq, kc3=\EOs, kcbt=\E[Z, kcub1=\E[D, 
        kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, 
        kel=\E[8\^, kend=\E[8~, kent=\EOM, kf0=\E[21~, kf1=\E[11~, 
        kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, 
        kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, 
        kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, 
        kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, 
        kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khome=\E[7~, 
        kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, 
        op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, 
        rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E>, rmso=\E[27m, 
        rmul=\E[24m, 
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, 
        rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>, 
        s0ds=\E(B, s1ds=\E(0, sc=\E7, setab=\E[4%p1%dm, 
        setaf=\E[3%p1%dm, 
       
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,

        sgr0=\E[m\017, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h, 
        smkx=\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
        vpa=\E[%i%p1%dd, 

There is also the possibility that I am completely insane because I
cant believe this has never been fixed!

Comment 1 patrick 2005-02-11 17:58:21 UTC
rxt should be rxvt

Comment 2 Eido Inoue 2005-02-11 20:36:33 UTC
Could not reproduce using a stock FC-3 (I'm assuming that's what you
meant with test3 version) with updates; perl and other apps backspace
worked fine (with kbs as ^H)-- in konsole (assuming you were testing
with TERM=konsole and TERM=xterm), xterm, and rxvt (assuming TERM=rxvt
and TERM=xterm).

As rxvt is not included with FC3 Core, I tested against the Fedora
Extras version at
http://download.fedora.us/fedora/fedora/3/i386/RPMS.extras/.


Comment 3 patrick 2005-02-18 17:20:14 UTC
My system was first installed redhat 6.1 and upgraded manually through
the years using either rpm -Fvh or apg-get upgarde. It is now the
equivalent of fedora core 3. Some time ago this problem started, it
affects TERM=rxvt and TERM=xterm (as used by kde's konsole app). It
affects all users and has been driving me crazy for some time. So the
other day I investigated and found that the terminfo changes fix the
problem. However, I have not tried a virgin FC3 install and I have
always been baffled as to why this problem had not been fixed. It
seems to me that something is mapping my backspace to ^? instead of
^H, I just cant figure out what on earth it could be. It seems this
isn't a bug in fc3 after all, but any help in tracking down what the
true problem could be would be appreciated.

Comment 4 patrick 2005-02-18 17:31:29 UTC
I have tracked down the problem. At somepoint rpm did not upgrade my:
/etc/bashrc
using the /etc/bashrc.rpmnew I found there has fixed the problem.
Sorry to trouble you.

Comment 5 Hans de Goede 2005-02-23 16:10:30 UTC
The real cause of this is ofcourse bug 142659, the old bashrc contained
stty erase `tput kbs`

Which appearantly has been removed, relying on the terminal to set the
stty erase correct itself, which is okay, but generates an
inconcistency between stty erase and terminfo.

Havill you might want to read bug 142569 as this is the result of the
much discussed bug 122815 and your input there would be very welcome.