NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/51385: NetBSD-7/amd64 tset(1) requires subsequent stty erase '^?'

>Number:         51385
>Category:       bin
>Synopsis:       NetBSD-7/amd64 tset(1) requires subsequent stty erase '^?'
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 02 02:40:00 +0000 2016
>Originator:     Matthew Mondor
>Release:        NetBSD 7.0_STABLE
System: NetBSD ninja.xisop 7.0_STABLE NetBSD 7.0_STABLE (GENERIC_MM) #0: Thu Jul 28 22:49:47 EDT 2016 root@ninja.xisop:/usr/obj/sys/arch/amd64/compile/GENERIC_MM amd64
Architecture: x86_64
Machine: amd64

After an update to NetBSD-7 from NetBSD-6, I noticed that in some
applications like vi(1) and vim(1) the backspace stopped working and
issued instances of ^? instead.  Only as the root user, with the same
editor configuration, and in all of: the native text console
(wsdisplay0 at radeondrmkmsfb0 in this case), xterm and urxvt
(rxvt-unicode).  On the other hand, if typing ^H (control-h) instead of
backspace, it works.

This does not occur with other users, and I then noticed that the
difference is that only the root user automatically ran tset(1)
in .profile.  Running tset(1) at any of the aforementioned terminals,
under any user, reproduces the issue.  If then running the
	stty erase '^?'
command, the normal behaviour is restored.

I'm not too familiar with tset(1) and terminfo(3) or the way they
exchange that information, but it would appear that the backspace
character is not being reported correctly on NetBSD-7.  The reset(1)
command also triggers the issue.

I could not yet test after a fresh install, although terminfo related
databases appear to have been updated during the upgrade (and although
old termcap and terminfo.db files which remained were renamed as a
test, they do not appear to interfere):

# ls -l /usr/share/misc/term*
-r--r--r--  1 root  wheel  2314240 Feb  2  2012 /usr/share/misc/termcap.db.old
-r--r--r--  1 root  wheel   555545 Feb  2  2012 /usr/share/misc/termcap.old
-r--r--r--  1 root  wheel  1000215 Jul 28 21:37 /usr/share/misc/terminfo
-r--r--r--  1 root  wheel  1457428 Jul 28 21:37 /usr/share/misc/terminfo.cdb
-rw-r--r--  1 root  wheel  2895872 Jun 14  2012 /usr/share/misc/terminfo.db.old

The entries in /etc/wscons.conf are configured with emulation vt100.
The entries in /etc/ttys are configured with the type wsvt25.


The urxvt package I have is still for NetBSD-6.  After moving the
termcap files, native X11's xterm works properly after running tset,
which indicates that old termcap files may interfere even though xterm
is linked with terminfo.  However, the non-X11 native console still has
the same issue, like urxvt.


$ tset
Erase set to backspace.                                                 
$ vi /tmp/tmp.txt
$ stty erase '^?'
$ vi /tmp/tmp.txt


Unclear at current time:

- postinstall may need to delete or move away obsolete possibly
  conflicting termcap/terminfo files.
- This seems to not be enough to solve the issue in the native console.


Home | Main Index | Thread Index | Old Index