[net.unix-wizards] setting TERM converted to 4.2BSD gripe

chris@umcp-cs.UUCP (Chris Torek) (02/24/85)

At the very least, there should be one file with this information:

	<tty> <speed> <type>

Right now this information must be extracted from three separate
files: /etc/ttys, /etc/gettytab, /etc/ttytype.  It seems to me that
the <speed> cannot (and should not) be inferred from the <type>,
so this is the proper organization for these.

What I might like to see: /etc/ttys looking like this:

	# anything here is a comment...
	# the first entry is "enablement" (this *is* /etc/ttys)
	1 tty00 autobaud dialup
	1 tty01 9600 aaa
	0 tty02 4800 weird	# the line is busted for some reason
	1 tty03 12,3 dialup	# 1200/300 only dialup

The first two fields are of use to /etc/init; the second and third
are of use to getty, and the fourth is of use to login (when setting
TERM).

Note that no changes to the kernel would be required (though init,
a pretty sensitive process, would have to be rewritten).
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland

jim@mcvax.UUCP (Jim McKie) (02/25/85)

Here is an extract from our /etc/ttys, which shows the format for 4.3BSD.
Note that the 'state' field can be a combination of 'off', 'on' and
'secure', there are no /etc/ttytypes or /etc/securetty type files any more.

	#
	# Terminal line definitions
	#
	# line	gettytab	termcap	       state	comment
	# ----	--------	-------	       -----	-------
	console	Console		decwriter	on	# console
	tty00	default		dumb		off	# (DH/DM) Micom line out
	tty01	default		dumb		off	# (DH/DM) Micom line out
	tty02	default		dumb		off	# (DH/DM) Micom line out
	tty03	default		dumb		off	# (DH/DM) Micom line out
	tty04	Dialup-1200	dumb		on	# (DH/DM) uucp dialin
	tty05	Dialup-1200	dumb		on	# (DH/DM) uucp dialin
	tty06	Dialup-1200	dumb		on	# (DH/DM) uucp dialin
	tty07	Auto-baud	dumb		on	# (DH/DM)
	tty08	default		dumb		off	# (DH/DM) Micom line out
	.....
	.....

--jim

jg@mit-athena.UUCP (Jim Gettys) (02/27/85)

	If you are going to let the cat out of the bag, at least get it
right (up to date).  There is additional support to run any program, not
just getty, on a terminal line, and support for User process window systems,
a'la' the X window system here at MIT, or the ITC window system at CMU.
Here is an example of one of our /etc/ttys files from here at MIT, in the
new format...  In addition, opening a terminal line has been moved from init
to getty to allow use of init as a "superdaemon" to maintain other daemon
programs.  These changes have been running here at MIT for some months, and
recently went west to Berkeley.
				Jim Gettys
				MIT/Project Athena

Here is a copy of an /etyc/ttys file.

#
# name		getty		type	status		comments
#
console	"/etc/getty e"		vt125	on secure
tty00	"/etc/getty rem.9600"	h19pc	on secure
tty01	"/etc/getty rem.9600"	h19pc	on secure
tty02	"/etc/getty rem.9600"	h19pc	on secure
tty03	"/etc/getty rem.9600"	h19pc	on secure
tty04	"/etc/getty rem.9600"	h19pc	on secure
tty05	"/etc/getty rem.9600"	h19pc	on secure
tty06	"/etc/getty rem.9600"	h19pc	on secure
tty07	"/etc/getty rem.9600"	h19pc	on secure
ttyp0	none		network
ttyp1	none		network
ttyp2	none		network
ttyp3	none		network
ttyp4	none		network
ttyp5	none		network
ttyp6	none		network
ttyp7	none		network
ttyp8	none		network
ttyp9	none		network
ttypa	none		network
ttypb	none		network
ttypc	none		network
ttypd	none		network
ttype	none		network
ttypf	none		network
ttyv0	"/usr/athena/xpty -L =65x80+4+5 -b 4 :0"	vs100 on secure window="/usr/athena/X 0"
ttyv1	"/usr/athena/xpty -L -fn 6x10 =40x80+0+0 :1"	vs100s off secure window="/usr/athena/X 1"

steve@tellab3.UUCP (Steve Harpster) (02/28/85)

...And then there are people like us who use a packet switch among our
computers ---  you can never be sure what tty you're on (i.e, the
terminal in my office may be tty01 on this login, but next time it
could be ttyhb).  Why should getty waste time looking up baudrates and
ttytypes?  In our case, we have a program which polls the terminal and
``guesses''.  It can be slow and not always right but if you don't like
it, you just don't call it.
-- 


...ihnp4!tellab1!steve
Steve Harpster
Tellabs, Inc.

guy@rlgvax.UUCP (Guy Harris) (03/01/85)

> There is additional support to run any program, not just getty, on a terminal
> line ...  Here is an example of one of our /etc/ttys files from here at MIT,
> in the new format...  In addition, opening a terminal line has been moved from
> init to getty to allow use of init as a "superdaemon" to maintain other daemon
> programs.

Well, you just sort of reinvented "/etc/inittab" from various UNIX systems,
most recently Systems III and V (but it originally appeared in, I believe,
Columbus UNIX).  They removed the terminal line opening from "init" and moved
it to "getty" (so that it can run other daemons), and set it up so that it
could run arbitrary programs, not just "getty".  They also added the notion of
"run-levels", so that there are several multi-user states which have different
processes running in them.  The S5 "init" even runs "/etc/rc" and its ilk out
of "/etc/inittab".

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