1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <sect1 id="postlfs-config-logon" xreflabel="Customizing your Logon with /etc/issue">
|
---|
9 | <sect1info>
|
---|
10 | <othername>$LastChangedBy$</othername>
|
---|
11 | <date>$Date$</date>
|
---|
12 | </sect1info>
|
---|
13 | <?dbhtml filename="logon.html"?>
|
---|
14 | <title>Customizing your Logon with /etc/issue</title>
|
---|
15 | <indexterm zone="postlfs-config-logon">
|
---|
16 | <primary sortas="e-etc-issue">/etc/issue</primary></indexterm>
|
---|
17 |
|
---|
18 | <para>When you first boot up your new <acronym>LFS</acronym> system, the logon
|
---|
19 | screen will be nice and plain (as it should be in a bare-bones system). Many
|
---|
20 | people however, will want their system to display some information in the logon
|
---|
21 | message. This can be accomplished using the
|
---|
22 | file <filename>/etc/issue</filename>.</para>
|
---|
23 |
|
---|
24 | <para>The <filename>/etc/issue</filename> file is a plain text file
|
---|
25 | which will also accept certain Escape sequences (see below) in order to
|
---|
26 | insert information about the system. There is also the file
|
---|
27 | <filename>issue.net</filename> which can be used when logging on remotely.
|
---|
28 | <command>ssh</command> however, will only use it if you set the option in the
|
---|
29 | configuration file and will also <emphasis>not</emphasis> interpret the
|
---|
30 | escape sequences shown below.</para>
|
---|
31 |
|
---|
32 | <para>One of the most common things which people want to do is to clear
|
---|
33 | the screen at each logon. The easiest way of doing that is to put a
|
---|
34 | "clear" escape-sequence into <filename>/etc/issue</filename>. A simple way of
|
---|
35 | doing this is to do <userinput><command>clear >
|
---|
36 | /etc/issue</command></userinput>.
|
---|
37 | This will insert the relevant escape code into the start of the
|
---|
38 | <filename>/etc/issue</filename> file. Note that if you do this, when
|
---|
39 | you edit the file, you should leave the ^[c character on
|
---|
40 | the first line alone.</para>
|
---|
41 |
|
---|
42 | <para>The following escapes are recognized by agetty (the program which
|
---|
43 | usually parses <filename>/etc/issue</filename>). This information is from
|
---|
44 | <command>man agetty</command> where you can find extra information
|
---|
45 | about the logon process.</para>
|
---|
46 |
|
---|
47 | <para>The <filename>issue</filename> file can contain certain escape codes to
|
---|
48 | display various information. All escape codes consist of a backslash
|
---|
49 | (\) immediately followed by one of the letters explained
|
---|
50 | below (so <option>\d</option> in <filename>/etc/issue</filename> would
|
---|
51 | insert the current date).</para>
|
---|
52 |
|
---|
53 | <screen>b Insert the baudrate of the current line.
|
---|
54 | d Insert the current date.
|
---|
55 | s Insert the system name, the name of the operating system.
|
---|
56 | l Insert the name of the current tty line.
|
---|
57 | m Insert the architecture identifier of the machine, e.g., i486
|
---|
58 | n Insert the nodename of the machine, also known as the hostname.
|
---|
59 | o Insert the domainname of the machine.
|
---|
60 | r Insert the release number of the kernel, e.g., 2.4.16.
|
---|
61 | t Insert the current time.
|
---|
62 | u Insert the number of current users logged in.
|
---|
63 | U Insert the string "1 user" or "<n> users" where <n> is the
|
---|
64 | number of current users logged in.
|
---|
65 | v Insert the version of the <acronym>OS</acronym>, e.g., the build-date etc.</screen>
|
---|
66 |
|
---|
67 | </sect1>
|
---|
68 |
|
---|