How do *you* identify terminals?

Guy Harris guy at rlgvax.UUCP
Sat Feb 11 11:17:55 AEST 1984


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.)



More information about the Comp.unix.wizards mailing list