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

Re: ANN: initial sparc potato boot floppies ready for testing



On Sun, 9 Jan 2000, Eric Delaunay wrote:

> On this topic, do you know about a way of identifying the type of console
> connected to the serial line ?  Is there an escape sequence that returns vt100
> or the like ?

Unfortunately, there is no universal mechanism for detecting what kind of
terminal you're attached to.  Even worse, you can't try to "autodetect" it,
since some terminals (now thankfully rare) will do Bad Things(tm) like lock
up when they're prodded in the wrong way.  Just look through /etc/termcap
sometime, it's "fascinating" reading... ;)

There is, however, an escape sequence pair you can use to determine what
model of VTxxx you're talking to.  It's documented rather nicely in
ctlseqs.ms, which is in /usr/share/xterm/doc/, so I won't waste bandwidth
by detailing it here.

I'd tend to say that assuming VT100 until told otherwise by the user isn't
a bad idea.  In fact, you can probably get away with assuming VT102.

[I had the opportunity several years to get very well-acquainted with not
only all the VT1xx escape sequences but all the bugs you have to emulate,
too, while writing a VT100 emulator in Turbo Pascal - even Telix was too
slow on my XT...]

-- 
Jeffrey Sean Connell __ | VP of Software Development, Convergence Equipment
ankh@canuck.gen.nz   \/ | PGP key: http://www.canuck.gen.nz/~ankh/pgpkey.html
------------------------+---------------------------------------------------- 


Reply to: