From owner-freebsd-arch@FreeBSD.ORG Fri Feb 21 18:15:46 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADD835B3; Fri, 21 Feb 2014 18:15:46 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 6C4A31C4E; Fri, 21 Feb 2014 18:15:46 +0000 (UTC) Received: from c122-106-144-87.carlnfd1.nsw.optusnet.com.au (c122-106-144-87.carlnfd1.nsw.optusnet.com.au [122.106.144.87]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 1E962420D09; Sat, 22 Feb 2014 05:15:37 +1100 (EST) Date: Sat, 22 Feb 2014 05:15:06 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ian Lepore Subject: Re: terminfo In-Reply-To: <1392997589.1145.91.camel@revolution.hippie.lan> Message-ID: <20140222030504.D3166@besplex.bde.org> References: <5304A0CC.5000505@FreeBSD.org> <1392997589.1145.91.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=HZAtEE08 c=1 sm=1 tr=0 a=p/w0leo876FR0WNmYI1KeA==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=IIIIMO1WzoMA:10 a=6I5d2MoRAAAA:8 a=ScsGqTL87VO4oIQuntwA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 Cc: Ed Schouten , Bryan Drewery , arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2014 18:15:46 -0000 On Fri, 21 Feb 2014, Ian Lepore wrote: > On Fri, 2014-02-21 at 13:05 +0100, Ed Schouten wrote: >> Hi Bryan, >> >> On 19 February 2014 13:17, Bryan Drewery wrote: >>> Why do we not use terminfo? Our termcap is quite aged and missing a lot >>> of modern terminals/clients. Why do we not use Windows? :-) >> It is true that our termcap is quite aged, but the fact is, once you >> add entries for a certain terminal, there's little need to update it >> after that. ncurses itself is not really a moving target. What kind of >> modern terminals/clients are missing? I tend to agree. I used to have several special termcap entries in .profile or .termcap because the system termcap was unreliable. Now after using mainly syscons for 20+ years, I have only 1 special termcap entry (a prefix to cons25) in .profile (to partly recover from breakage of some syscons escape sequences). >> ... >> I won't deny that termcap was really useful at one point in time, but >> let's be honest: the variety of terminals out there has massively >> dropped over time. Terminal emulation has become a solved problem. As >> of FreeBSD 9, syscons supports all the sequences described in >> xterm-256color, though it isn't able to print more than 8 colours, >> which is why we use TERM=xterm. Tools like screen, tmux, etc., they >> >> I suspect the following logic would be sufficient for at least 99.5% >> of our users: >> >> if $TERM contains 256 >> use xterm-256color >> else >> use xterm >> ... >> $TERM should die. > > All of that seems to assume that every terminal actually being used in > the world today is either xterm or something that emulates it. Try > using vi on a serial console on an embedded ARM board and you'll get a > quick frustrating lesson in how not-xterm a serial console is. I've yet > to find a combo of serial comms program and TERM setting that actually > works well and lets you edit a file with vi. What display device is the ARM board connected to that causes a problem? I use an intentionally simple terminal program that does no translation, and haven't noticed many problems. Even tip/cu should work similarly. TERM/TERMCAP/.termcap are just the host's values for non-serial terminal activity. These must be copied to all targets. This only works for hosts and targets that are Unix-like OSes which support TERM/TERMCAP/.termcap of course. The display hardware and the software that controls it is on the PC so its escape sequences can be anything I want. Bruce