Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1a 12/4/83; site rlgvax.UUCP
Path: utzoo!linus!philabs!cmcl2!floyd!harpo!seismo!rlgvax!guy
From: guy@rlgvax.UUCP (Guy Harris)
Newsgroups: net.info-terms,net.unix-wizards
Subject: Re: How do *you* identify terminals?
Message-ID: <1704@rlgvax.UUCP>
Date: Fri, 10-Feb-84 20:17:55 EST
Article-I.D.: rlgvax.1704
Posted: Fri Feb 10 20:17:55 1984
Date-Received: Sat, 11-Feb-84 23:34:21 EST
References: <6933@mgweed.UUCP>
Organization: CCI Office Systems Group, Reston, VA
Lines: 28

Berkeley UNIX has the "/etc/ttytype" file, which (for hardwired lines)
indicates what type of terminal is attached; "login" reads that file and
fills the TERM environment entry for you.  We're running the System III
"init", "getty", and "login"; we just:

	1) fixed "login" so that, instead of rudely stomping on the
	   environment, gently *adds* things (like HOME, etc.) to the
	   environment.

	2) use "env" as the command in the line in "/etc/inittab" and
	   set TERM in the "inittab" line; i.e., you say things like

		2:h0:c:env TERM=vt100 /etc/getty ttyh0 d

	   which has the same effect, namely that a user's terminal
	   type is automatically set when they log in.

The same trick will work with the System V "init" and "login", once you've
fixed "login".  Of course, this doesn't help dial-ins, but except for
places like a certain large corporation which has an inordinate love for
1200 baud dial-up lines, 99% of a user's work is likely to be on a hardwired
terminal.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy

(BTW, if you think "/dev/ttyh0" sounds more like a Berkeley TTY name
rather than a USG tty name, you're right.)