2004-06-10 12:31:35 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-04-05 03:42:53 +08:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-06-10 12:31:35 +08:00
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
|
|
|
|
2005-01-15 08:30:04 +08:00
|
|
|
<sect1 id="postlfs-config-logon" xreflabel="Customizing your Logon with /etc/issue">
|
2005-05-13 04:23:24 +08:00
|
|
|
<?dbhtml filename="logon.html"?>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
2005-05-13 04:23:24 +08:00
|
|
|
<sect1info>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
2005-05-13 04:23:24 +08:00
|
|
|
<title>Customizing your Logon with /etc/issue</title>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
2005-05-13 04:23:24 +08:00
|
|
|
<indexterm zone="postlfs-config-logon">
|
|
|
|
<primary sortas="e-etc-issue">/etc/issue</primary>
|
|
|
|
</indexterm>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
2020-03-25 23:07:11 +08:00
|
|
|
<para>
|
|
|
|
When you first boot up your new LFS system, the logon screen will be
|
|
|
|
nice and plain (as it should be in a bare-bones system). Many people
|
|
|
|
however, will want their system to display some information in the logon
|
|
|
|
message. This can be accomplished using the
|
|
|
|
file <filename>/etc/issue</filename>.
|
|
|
|
</para>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
2020-03-25 23:07:11 +08:00
|
|
|
<para>
|
|
|
|
The <filename>/etc/issue</filename> file is a plain text file
|
|
|
|
which will also accept certain escape sequences (see below) in order to
|
|
|
|
insert information about the system. There is also the file
|
|
|
|
<filename>issue.net</filename> which can be used when logging on remotely.
|
|
|
|
<command>ssh</command> however, will only use it if you set the option in
|
|
|
|
the configuration file and will <emphasis>not</emphasis> interpret the
|
|
|
|
escape sequences shown below.
|
|
|
|
</para>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
2020-03-25 23:07:11 +08:00
|
|
|
<para>
|
|
|
|
One of the most common things which people want to do is clear the
|
|
|
|
screen at each logon. The easiest way of doing that is to put a "clear"
|
|
|
|
escape sequence into <filename>/etc/issue</filename>. A simple way of
|
|
|
|
doing this is to issue the command <command>clear >
|
|
|
|
/etc/issue</command>. This will insert the relevant escape code into
|
|
|
|
the start of the <filename>/etc/issue</filename> file. Note that if
|
|
|
|
you do this, when you edit the file, you should leave the characters
|
|
|
|
(normally '^[[H^[[2J') on the first line alone.
|
|
|
|
</para>
|
2005-11-30 03:07:13 +08:00
|
|
|
|
2020-03-25 23:07:11 +08:00
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
Terminal escape sequences are special codes recognized by the terminal.
|
|
|
|
The ^[ represents an ASCII ESC character. The sequence ESC [ H
|
|
|
|
puts the cursor in the upper left hand corner of the screen and ESC 2 J
|
|
|
|
erases the screen. For more information on terminal escape sequences see
|
|
|
|
<ulink url='http://rtfm.etla.org/xterm/ctlseq.html'/>
|
|
|
|
</para>
|
|
|
|
</note>
|
2005-05-13 04:23:24 +08:00
|
|
|
|
2020-03-25 23:07:11 +08:00
|
|
|
<para>
|
|
|
|
The following sequences are recognized by <command>agetty</command>
|
|
|
|
(the program which usually parses <filename>/etc/issue</filename>). This
|
|
|
|
information is from <command>man agetty</command> where you can find
|
|
|
|
extra information about the logon process.
|
|
|
|
</para>
|
2005-05-13 04:23:24 +08:00
|
|
|
|
2020-03-25 23:07:11 +08:00
|
|
|
<para>
|
|
|
|
The <filename>issue</filename> file can contain certain character
|
|
|
|
sequences to display various information. All <filename>issue</filename>
|
|
|
|
sequences consist of a backslash (\) immediately followed by one of the
|
|
|
|
letters explained below (so <option>\d</option> in
|
|
|
|
<filename>/etc/issue</filename> would insert the current date).
|
|
|
|
</para>
|
2005-05-13 04:23:24 +08:00
|
|
|
|
|
|
|
<screen><literal>b Insert the baudrate of the current line.
|
2002-07-08 04:28:42 +08:00
|
|
|
d Insert the current date.
|
|
|
|
s Insert the system name, the name of the operating system.
|
|
|
|
l Insert the name of the current tty line.
|
2005-07-23 04:07:57 +08:00
|
|
|
m Insert the architecture identifier of the machine, e.g., i686.
|
2002-07-08 04:28:42 +08:00
|
|
|
n Insert the nodename of the machine, also known as the hostname.
|
|
|
|
o Insert the domainname of the machine.
|
2005-07-23 04:07:57 +08:00
|
|
|
r Insert the release number of the kernel, e.g., 2.6.11.12.
|
2002-07-08 04:28:42 +08:00
|
|
|
t Insert the current time.
|
|
|
|
u Insert the number of current users logged in.
|
|
|
|
U Insert the string "1 user" or "<n> users" where <n> is the
|
|
|
|
number of current users logged in.
|
2005-05-13 04:23:24 +08:00
|
|
|
v Insert the version of the OS, e.g., the build-date etc.</literal></screen>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
|
|
|
</sect1>
|