6/12/72 GETTY (VII) NAME getty -- set typewriter mode and get user's name SYNOPSIS -- DESCRIPTION getty is invoked by init (VII) immediately after a typewriter is opened following a dial-in. The user's login name is read and the login(I) com- mand is called with this name as an argument. While reading this name getty attempts to adapt the system to the speed and type of terminal be- ing used. getty initially sets the speed of the interface to 150 baud, specifies that raw mode is to be used (break on every character), that echo is to be suppressed, and either parity allowed. It types the "login:" message (which includes the characters which put the 37 Teletype terminal into full-duplex and unlock its keyboard). Then the user's name is read, a character at a time. If a null character is received, it is assumed to be the result of the user pushing the "break" ("interrupt") key. The speed is then changed to 300 baud and the "login:" is typed again, this time with the appropriate sequence which puts a GE TermiNet 300 into full-duplex. This sequence is acceptable to other 300 baud terminals also. If a subsequent null character is received, the speed is changed again. The general approach is to cycle through a set of speeds in response to null characters caused by breaks. The sequence at this installation is 150, 300, and 134.5 baud. Detection of IBM 2741s is accomplished while the speed is set to 150 baud. The user sends a 2741 style "eot" character by pushing the attention key or by typing return; at 150 baud, this char- acter looks like the ascii "~" (174 ). Upon re- 8 ceipt of the "eot", the system is set to operate 2741s and a "login: " message is typed. The user's name is terminated by a new-line or carriage-return character. The latter results in the system being set to to treat carriage returns appropriately (see stty(II)). The user's name is scanned to see if it contains any lower-case alphabetic characters; if not, the system is told to map any future upper-case char- acters into the corresponding lower-case charac- ters. Thus UNIX is usable from upper-case-only terminals. Finally, login is called with the user's name as argument. FILES /etc/getty SEE ALSO init(VII), login(I), stty(II) DIAGNOSTICS -- BUGS -- OWNER dmr, ken, jfo