401 lines
5.7 KiB
HTML
401 lines
5.7 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Configure getty</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="Remote Serial Console HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Configure Linux kernel using
|
|
SYSLINUX"
|
|
HREF="configure-kernel-syslinux.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="init system"
|
|
HREF="getty-init.html"></HEAD
|
|
><BODY
|
|
CLASS="CHAPTER"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Remote Serial Console HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="configure-kernel-syslinux.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="getty-init.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="CHAPTER"
|
|
><H1
|
|
><A
|
|
NAME="GETTY"
|
|
></A
|
|
>Chapter 6. Configure <SPAN
|
|
CLASS="PRODUCTNAME"
|
|
>getty</SPAN
|
|
></H1
|
|
><DIV
|
|
CLASS="TOC"
|
|
><DL
|
|
><DT
|
|
><B
|
|
>Table of Contents</B
|
|
></DT
|
|
><DT
|
|
>6.1. <A
|
|
HREF="getty-init.html"
|
|
><SPAN
|
|
CLASS="PRODUCTNAME"
|
|
>init</SPAN
|
|
> system</A
|
|
></DT
|
|
><DT
|
|
>6.2. <A
|
|
HREF="getty-getty.html"
|
|
>Traditional <SPAN
|
|
CLASS="PRODUCTNAME"
|
|
>getty</SPAN
|
|
></A
|
|
></DT
|
|
><DT
|
|
>6.3. <A
|
|
HREF="getty-agetty.html"
|
|
><SPAN
|
|
CLASS="PRODUCTNAME"
|
|
>agetty</SPAN
|
|
></A
|
|
></DT
|
|
><DT
|
|
>6.4. <A
|
|
HREF="getty-mgetty.html"
|
|
><SPAN
|
|
CLASS="PRODUCTNAME"
|
|
>mgetty</SPAN
|
|
></A
|
|
></DT
|
|
><DT
|
|
>6.5. <A
|
|
HREF="getty-mingetty.html"
|
|
><SPAN
|
|
CLASS="PRODUCTNAME"
|
|
>mingetty</SPAN
|
|
></A
|
|
></DT
|
|
><DT
|
|
>6.6. <A
|
|
HREF="getty-none.html"
|
|
>No <SPAN
|
|
CLASS="PRODUCTNAME"
|
|
>getty</SPAN
|
|
></A
|
|
></DT
|
|
></DL
|
|
></DIV
|
|
><P
|
|
><SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
> monitors serial lines,
|
|
waiting for a connection. It then configures the serial link, sends
|
|
the contents of <TT
|
|
CLASS="FILENAME"
|
|
>/etc/issue</TT
|
|
>, and asks the person
|
|
connecting for their login name. <SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
>
|
|
then starts <SPAN
|
|
CLASS="APPLICATION"
|
|
>login</SPAN
|
|
> and
|
|
<SPAN
|
|
CLASS="APPLICATION"
|
|
>login</SPAN
|
|
> asks the person for their password.
|
|
If the user does nothing, <SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
> or
|
|
<SPAN
|
|
CLASS="APPLICATION"
|
|
>login</SPAN
|
|
> hang up and
|
|
<SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
> goes back to waiting.</P
|
|
><P
|
|
>The <SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
> command has been
|
|
re-implemented numerous times. There is a wide selection of
|
|
<SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
> clones, each with slight
|
|
differences in behavior and syntax. We will describe the
|
|
traditional <SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
>, and then some popular
|
|
alternatives.</P
|
|
><P
|
|
>One of the jobs of a <SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
> is to
|
|
set the <TT
|
|
CLASS="VARNAME"
|
|
>TERM</TT
|
|
> environment variable to indicate the
|
|
make and model of the terminal which is connecting. In this
|
|
<I
|
|
CLASS="CITETITLE"
|
|
>HOWTO</I
|
|
> we set the terminal to the commonly
|
|
emulated <SPAN
|
|
CLASS="PRODUCTNAME"
|
|
><SPAN
|
|
CLASS="ACRONYM"
|
|
>DEC</SPAN
|
|
>
|
|
<SPAN
|
|
CLASS="ACRONYM"
|
|
>VT100</SPAN
|
|
></SPAN
|
|
>. If you occassionally
|
|
connect using a different terminal emulation then you can
|
|
interactively change your choice of terminal by setting
|
|
<TT
|
|
CLASS="VARNAME"
|
|
>TERM</TT
|
|
> to the appropiate terminal listed in
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/etc/termcap</TT
|
|
>.</P
|
|
><DIV
|
|
CLASS="FIGURE"
|
|
><A
|
|
NAME="GETTY-TERM"
|
|
></A
|
|
><P
|
|
><B
|
|
>Figure 6-1. Interactively altering the connecting terminal's make and
|
|
model</B
|
|
></P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
><TT
|
|
CLASS="PROMPT"
|
|
>bash$</TT
|
|
> <B
|
|
CLASS="COMMAND"
|
|
>TERM=kermit</B
|
|
>
|
|
<TT
|
|
CLASS="PROMPT"
|
|
>bash$</TT
|
|
> <B
|
|
CLASS="COMMAND"
|
|
>tset -r</B
|
|
></PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><P
|
|
>A <SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
> is also responsible for
|
|
setting the time zone when a permanently-connected remote terminal
|
|
is located beyond the machine's default time zone. The
|
|
<SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
> overrides the default timezone by
|
|
setting the <TT
|
|
CLASS="ENVAR"
|
|
>TZ</TT
|
|
> environment variable. As with the
|
|
<TT
|
|
CLASS="ENVAR"
|
|
>TERM</TT
|
|
> environment variable, a user connecting from a
|
|
modem can interactively override the default time zone.</P
|
|
><DIV
|
|
CLASS="FIGURE"
|
|
><A
|
|
NAME="GETTY-TZ"
|
|
></A
|
|
><P
|
|
><B
|
|
>Figure 6-2. Interactively altering the connecting terminal's time zone</B
|
|
></P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
><TT
|
|
CLASS="PROMPT"
|
|
>bash$</TT
|
|
> <B
|
|
CLASS="COMMAND"
|
|
>TZ=Australia/Adelaide</B
|
|
>
|
|
<TT
|
|
CLASS="PROMPT"
|
|
>bash$</TT
|
|
> <B
|
|
CLASS="COMMAND"
|
|
>export TZ</B
|
|
></PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><P
|
|
>If you do not know your time zone name, run the
|
|
<B
|
|
CLASS="COMMAND"
|
|
>tzselect</B
|
|
> utility to generate the appropiate
|
|
contents for <TT
|
|
CLASS="ENVAR"
|
|
>TZ</TT
|
|
>.</P
|
|
><P
|
|
>But first, let's see how <SPAN
|
|
CLASS="APPLICATION"
|
|
>getty</SPAN
|
|
> gets
|
|
started in the first place.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="configure-kernel-syslinux.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="getty-init.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Configure Linux kernel using
|
|
<SPAN
|
|
CLASS="APPLICATION"
|
|
>SYSLINUX</SPAN
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><SPAN
|
|
CLASS="PRODUCTNAME"
|
|
>init</SPAN
|
|
> system</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |