[comp.sys.hp] Determining terminal types

gerwitz@Kodak.com (Paul Gerwitz) (06/07/91)

We have an application which might be accessed either by VT100 terminal
users or HP terminal users.  We would like to be able to automatically
differentiate the terminal types without user intervention.  We can send a
HP terminal ID escape sequence out the tty device and get a good answer
back from HP terminals, but obviously non-hp terminals wont respond.  Is
there a general purpose method to do that without prompting the user with
tset or hard setting the id's in the /etc/ttytype file ?
-- 
 +----------------------------------------------------------------------------+
 | Paul F Gerwitz  WA2WPI  | SMTP: gerwitz@kodak.com                          |
 | Eastman Kodak Co        | UUCP: ..uunet!atexnet!kodak!eastman!gerwitz      |
 +----------------------------------------------------------------------------+

belkin@teecs.UUCP (Hershel Belkin) (06/10/91)

There is a program called "qterm" (I think I pulled it off the
comp.sources.unix archive) which uses a table-driven approach
to sending query strings to terminals.  I had to make one small
mod to the program in order to properly sense VT320 terminals,
but VT100, VT220, and all HP terminals are sensed properly (as
well as lots of other types, limited only by the configured
data table).  I run it from /etc/profile, and it works well,
even sending a string to the user's terminal indicating that
the system has "recognized" the terminal as a "whatever".

If you are unable to locate qterm, e-mail to me and I'll arrange
to send you a copy directly (about 165K compressed tar archive).

+-----------------------------------------------+-------------------------+
| Hershel Belkin               hp9000/825(HP-UX)| UUCP: teecs!belkin      |
| Test Equipment Engineering Computing Services |Phone: 416 249-1231 x2647|
| Litton Systems Canada Limited       (Toronto) |  FAX: 416 246-2016      |
+-----------------------------------------------+-------------------------+

mike@hpwin052.HP.COM (Mike Croom) (06/11/91)

Why not time out if no reply and try the DEC equivalent

-------------------------------------------------------------------------------
| Mike Croom                       mike@hpwin052.uksr.hp.com                  -
| Financial Services AEO                                                      -
| London UK                        --------------------------------------------
| +44-71-583-6565                  No catchy motto thought of yet             -
| VoiceMail +44-344-367538  --------------------------------------------------- 

rsh@hpfcdc.HP.COM (Scott Holbrook) (06/13/91)

> We have an application which might be accessed either by VT100
> terminal users or HP terminal users.  We would like to be able
> to automatically differentiate the terminal types without user
> intervention.  We can send a HP terminal ID escape sequence out
> the tty device and get a good answer back from HP terminals, but
> obviously non-hp terminals wont respond.  Is there a general
> purpose method to do that without prompting the user with tset
> or hard setting the id's in the /etc/ttytype file ?

As of 8.0, HP-UX comes standard with a program, ttytype(1), that can
automatically identify HP, ANSI and Wyse terminals.  It even will
set LINES, COLUMNS and ERASE for you with the right options.  See
the man page that comes with the 8.0 release for more information.

Scott Holbrook / rsh@hpfcla
HP-UX kernel