Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getty(M) — OpenDesktop 1.0.0y

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ct(C)

init(M)

login(M)

uugetty(M)

tty(HW)

ioctl(S)

gettydefs(F)

inittab(F)


     GETTY(M)                                   UNIX System V



     Name
          getty  -  sets  terminal  type,  modes,  speed,   and   line
          discipline


     Syntax
          /etc/getty [ -h ] [ -t timeout ]  line  [  speed  [  type
          [ linedisc ] ] ]
          /etc/getty -c file


     Description
          getty is a program that is invoked by init(M).   It  is  the
          second process in the series, (init-getty-login-shell), that
          ultimately connects a user with the UNIX system.   Initially
          getty  displays  the login message field for the entry it is
          using from /etc/gettydefs.  getty  reads  the  user's  login
          name  and  invokes the login(M) command with the user's name
          as argument.  While reading  the  name,  getty  attempts  to
          adapt  the  system  to  the speed and type of terminal being
          used.

          Line is the name of a tty line in /dev to which getty is  to
          attach itself.  getty uses this string as the name of a file
          in the /dev directory to open for reading and writing.   The
          -t  flag,  plus  timeout  in  seconds,  specifies that getty
          should exit if the open on the  line  succeeds  and  no  one
          enters  anything  in  the  specified number of seconds.  The
          optional second argument, speed, is a label to a  speed  and
          tty  definition in the file /etc/gettydefs.  This definition
          tells getty what speed to  initially  run,  what  the  login
          message should look like, what the initial tty settings are,
          and what speed to try next should the user indicate that the
          speed is inappropriate (by entering a BREAK character).  The
          default speed is 9600 baud.

          Type, the optional third argument,  is  a  character  string
          describing  to  getty  what type of terminal is connected to
          the line in question.  getty recognizes the following types:

               none          default
               ds40-1         DATASPEED terminal 40/1
               tektronix,tek  TEKTRONIX
               vt61            Digital Equipment vt61
               vt100           Digital Equipment vt100
               hp45           Hewlett-Packard 45
               c100            Concept 100

          The default terminal  is  none;  i.e.,  any  crt  or  normal
          terminal  unknown  to the system.  For terminal type to have
          any meaning, the virtual terminal handlers must be  compiled
          into  the  operating  system.   They  are available, but not
          compiled in the  default  condition.   The  optional  fourth
          argument,  linedisc,  is a character string describing which
          line discipline to use in communicating with  the  terminal.
          Again  the  hooks  for line disciplines are available in the
          operating system but there is only one presently  available,
          the default line discipline,

               LDISC0.

          When given no optional arguments, getty sets  the  speed  of
          the  interface to 9600 baud, specifies that raw mode will be
          used  (awaken  on  every  character),  that  echo  will   be
          suppressed,  either parity allowed, that new-line characters
          will be converted to carriage return-line feed, and that tab
          expansion  is performed on the standard output.  It displays
          the login message before reading the user's name a character
          at  a  time.   If  a  null  character  (or framing error) is
          received, it is assumed to be the result of the user pushing
          the  BREAK  key.   This will cause getty to attempt the next
          speed in  the  series.   The  series  that  getty  tries  is
          determined by what it finds in /etc/gettydefs.

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

          The user's name is scanned to see if it contains any  lower-
          case alphabetic characters. getty suggests that the user use
          all lower-case characters.  If  the  user  uses  upper  case
          characters,  the system is told to map any future upper-case
          characters into the corresponding lower-case characters.

          Finally,  login  is  exec'd  with  the  user's  name  as  an
          argument.  Additional arguments may be typed after the login
          name.  These are passed to login, which will place  them  in
          the environment [see login(M)].

          A check option is provided.  When getty is invoked with  the
          -c option and file, it scans the file as if it were scanning
          /etc/gettydefs and prints out the results  to  the  standard
          output.   If  there are any unrecognized modes or improperly
          constructed entries, it reports these.  If the  entries  are
          correct,  it  displays the values of the various flags.  See
          ioctl(S) to interpret the values.  Note that some values are
          added to the flags automatically.


     Files
          /etc/gettydefs


     See Also
          ct(C), init(M),  login(M),  uugetty(M),  tty(HW),  ioctl(S),
          gettydefs(F), inittab(F)


     Notes
          While getty  understands  simple  single  character  quoting
          conventions,  it  is  not  possible to quote certain special
          control characters used by getty.  Thus, you cannot  log  in
          via  getty and type a #, @, /, !, , backspace, ^U, ^D, or &
          as part of your login name or arguments.  getty uses them to
          determine  when  the end of the line has been reached, which
          protocol is being used, and what  the  erase  character  is.
          They  will  always  be  interpreted  as having their special
          meaning.

          When connecting two computers  using  a  direct  connection,
          never  invoke  getty(M)  on  the  ports  of  both  machines.
          Instead, use uugetty(M).


     (printed 8/23/89)                                  GETTY(M)

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