Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getty(8) — GENIX 4.1A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

init(8)

login(1)

stty(2)

ttys(5)

gettytab(5)



      GETTY(8)                GENIX Programmer's Manual                GETTY(8)



      NAME
           getty  - set terminal mode

      SYNOPSIS
           /etc/getty [ char ]

      DESCRIPTION
           Getty is invoked by init(8) immediately after a terminal is  opened,
           following the making of a connection.  Getty reads a login name and,
           while doing so, attempts to adapt the system to the speed  and  type
           of terminal being used.

           Init calls getty with an argument specified by the ttys  file  entry
           for  the terminal line.  Getty uses this argument, which defaults to
           `0', to select a particular line configuration to use in reading the
           login  name.   After  setting  line  characteristics,  getty types a
           banner containing the system's name (from /usr/include/ident.h), the
           machine's  host  name,  and the `login:' message.  Then it reads the
           user's name, 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.  Getty treats this event as an indication
           that  the current line configuration is incorrect.  It establishes a
           new set of line charactersistics, retypes the  banner,  throws  away
           any  characters  it  has  already  read, and tries again to read the
           user's name.  Successive `break' characters cycle through additional
           line configurations.

           The user's name is terminated by a new-line or carriage-return char-
           acter.  The latter results in the system being set to treat carriage
           returns appropriately (see stty(2)).

           The user's name is scanned to see  if  it  contains  any  lower-case
           alphabetic characters; if not, and if the name is nonempty, the sys-
           tem is told  to  map  any  future  upper-case  characters  into  the
           corresponding lower-case characters.

           Finally, login is called with the user's name as argument.

           When invoked, getty reads the file /etc/gettytab  to  determine  the
           collection of line configurations it is to use in reading the user's
           login name.  Most line configurations specify that raw mode is to be
           used  (wake  up  on every character), that echo is to be suppressed,
           and either parity allowed.  They  are  usually  arranged  in  cycles
           whose  members  differ  only  in  baud  rate.   See  gettytab(5) for
           details.

           A line configuration can specify automatic line speed determination.
           In  this  case  getty sets the line speed initially to 1200 baud and
           reads a character, which it assumes to  be  a  carriage-return.   It
           then  sets  the  line  speed based on the results of the read.  This
           technique is only partially reliable; see BUGS below.




      Printed 11/16/83                                                        1





      GETTY(8)                GENIX Programmer's Manual                GETTY(8)



           If getty cannot read gettytab, it uses a built in 300 baud line con-
           figuration, which is provided as a hedge against disaster.

      FILES
           /etc/gettytab    table of terminal line descriptions
           /etc/ttys        source of argument given to getty

      SEE ALSO
           init(8), login(1), stty(2), ttys(5), gettytab(5)

      BUGS
           The autobauding code fails for some line speeds, but works  for  the
           most common speeds.  It should be tested in a particular environment
           before being used in production.









































      Printed 11/16/83                                                        2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026