Subject: bin/20111: Export window(1) TERMCAP binding to termcap database.
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/29/2003 13:42:06
>Number:         20111
>Category:       bin
>Synopsis:       Export window(1) TERMCAP binding to termcap database.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 29 11:45:03 PST 2003
>Originator:     Richard Rauch
>Release:        NetBSD 1.6
  "I probably don't know what I'm talking about."
System: NetBSD prometheus 1.6 NetBSD 1.6 (GENERIC) #0: Sun Sep 8 19:43:40 UTC 2002 i386
     $NetBSD: termcap.src,v 2002/08/05 07:05:32 lukem Exp $
Architecture: i386
Machine: i386
	window(1), which ships with the base system, defines a funky emulated
	terminal.  This terminal is supported by a termcap entry, written to
	the TERMCAP environment variable.  The termcap entry is not to be
	found in any termcap database that I've seen, however.

	This has the effect that if you (1) run window then (2) ssh from one
	of the windows to a remote (or local!) site, the terminal type is not
	recognized, and applications treat it as a dumb terminal.

	By putting the entry into NetBSD's termcap database, it at least will
	not lose when you connect from window to a NetBSD box.
	[do something to lose $TERMCAP in one of the windows]
	Try to do anything requiring valid termcap entries.
	Workaround: You can paste the termcap entry into a local ~/.termcap
	file whereever you go.

	A fix is the following patch against termcap.src from NetBSD 1.6:
	(I used a local RCS/ dir rather than diff'ing against CVS; I'm so

$ rcsdiff -u termcap.src
RCS file: RCS/termcap.src,v
retrieving revision 1.1
diff -u -r1.1 termcap.src
--- termcap.src 2003/01/29 19:02:40     1.1
+++ termcap.src 2003/01/29 19:29:35
@@ -916,6 +916,24 @@
 wsvt25m|NetBSD wscons in 25 line DEC VT220 mode with Meta:\
+# This is the window-v2 binding that NetBSD's window(1) sticks
+# into the TERMCAP environment variable.  Exported here so that
+# users of window can start window, ssh to another box, and still
+# use window as more than a dumb-terminal.  Note that window is
+# bizarre terminal; it does not appear to emulate anything with
+# which I am familiar.
+# NetBSD's window's TERMCAP variable binding appears to be unchanged
+# since window was imported to the CVS tree, so this should be the
+# "standard" window termcap entry required.
+WW|window-v2|window program version 2: \
+       :am:bs:da:db:ms:pt:cr=^M:nl=^J:bl=^G:ta=^I: \
+       :cm=\EY%+ %+ :le=^H:nd=\EC:up=\EA:do=\EB:ho=\EH: \
+       :cd=\EJ:ce=\EK:cl=\EE:me=\Er^?:co#80:li#28:se=\ErA:so=\EsA: \
+       :mr=\EsA:ue=\ErD:us=\EsD:ae=\ErH:as=\EsH:al=\EL:dl=\EM: \
+       :im=\E@:ei=\EO:ic=:mi:dc=\EN: \
+       :kb=^H:ku=^[OA:kd=^[OB:kl=^[OD:kr=^[OC:kh=^[OH:
 #### FreeBSD console entries
 # From: Andrey Chernov <> 29 Mar 1996