Subject: xsrc/20345: backspace doesn't work in xterm
To: None <gnats-bugs@gnats.netbsd.org>
From: None <pavel.cahyna@st.mff.cuni.cz>
List: netbsd-bugs
Date: 02/14/2003 10:11:51
>Number:         20345
>Category:       xsrc
>Synopsis:       backspace doesn't work in xterm
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 14 10:12:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Pavel Cahyna
>Release:        1.6_STABLE
>Organization:
>Environment:
NetBSD omega 1.6_STABLE NetBSD 1.6_STABLE (GENERIC) #0: Fri Nov 22 12:41:51 MET 2002     bouyer@java:/home/tmp/alpha/obj/sys/arch/alpha/compile/GENERIC alpha

>Description:
if I start an xterm and run /bin/sh in it, backspace doesn't work.
after pressing backspace, characters ^? appear instead of previous
character being deleted. Same for vi. This bug doesn't manifest itself
in ksh.

stty reports:
....
eol2    erase   
^@      ^H      


>How-To-Repeat:

>Fix:
It is sufficient to add the line

*ptyInitialErase: true

to the file /usr/X11R6/lib/X11/app-defaults/XTerm .

(That's btw what debian xterm package does.)

After doing that and restarting xterm, stty -a reports:
...
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>; eol2 = ^@;
        erase = ^?; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\;
        reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z;
        time = 0; werase = ^W;

and backspace works OK in sh and vi.

>Release-Note:
>Audit-Trail:
>Unformatted: