1 | <sect1 id="postlfs-config-logon">
|
---|
2 | <?dbhtml filename="logon.html" dir="postlfs"?>
|
---|
3 | <title>/etc/issue (Customising your logon)</title>
|
---|
4 |
|
---|
5 | <para>When you first boot up your new LFS system, the logon screen will
|
---|
6 | be nice and plain (as it should be in a bare-bones system). Many people
|
---|
7 | however, will want their system to display some information in the logon
|
---|
8 | message. This can be accomplished using the
|
---|
9 | file <filename>/etc/issue</filename>.</para>
|
---|
10 |
|
---|
11 | <para>The <filename>/etc/issue</filename> file is a plain text file
|
---|
12 | which will also accept certain Escape sequences (see below) in order to
|
---|
13 | insert information about the system. There is also the file
|
---|
14 | <filename>issue.net</filename> which can be used when logging on remotely.
|
---|
15 | SSH however, will only use it if you set the option in the
|
---|
16 | configuration file and will also <emphasis>not</emphasis> interpret the
|
---|
17 | escape sequences as shown below.</para>
|
---|
18 |
|
---|
19 | <para>One of the most common things which people want to do is to clear
|
---|
20 | the screen at each logon. The easiest way of doing that is to put a
|
---|
21 | "clear" escape into /etc/issue. A simple way of doing this is to do
|
---|
22 | <userinput>clear > /etc/issue</userinput>. This will insert the
|
---|
23 | relevant escape code into the start of the
|
---|
24 | <filename>/etc/issue</filename> file. Note that if you do this, when
|
---|
25 | you edit the file, you should leave the ^[c character on the first line
|
---|
26 | alone.</para>
|
---|
27 |
|
---|
28 | <para>The following escapes are recognised by agetty (the program which
|
---|
29 | usually parses <filename>/etc/issue</filename>). This information is from
|
---|
30 | <userinput>man agetty</userinput> where you can find extra information
|
---|
31 | about the logon process.</para>
|
---|
32 |
|
---|
33 | <para>The issue-file can contain certain escape codes to display various
|
---|
34 | information. All escape codes consist of a backslash (\) immediately followed
|
---|
35 | by one of the letters explained below (so \d in
|
---|
36 | <filename>/etc/issue</filename> would insert the current date).</para>
|
---|
37 |
|
---|
38 | <para><screen>b Insert the baudrate of the current line.
|
---|
39 | d Insert the current date.
|
---|
40 | s Insert the system name, the name of the operating system.
|
---|
41 | l Insert the name of the current tty line.
|
---|
42 | m Insert the architecture identifier of the machine, eg. i486
|
---|
43 | n Insert the nodename of the machine, also known as the hostname.
|
---|
44 | o Insert the domainname of the machine.
|
---|
45 | r Insert the release number of the kernel, eg. 2.4.16.
|
---|
46 | t Insert the current time.
|
---|
47 | u Insert the number of current users logged in.
|
---|
48 | U Insert the string "1 user" or "<n> users" where <n> is the
|
---|
49 | number of current users logged in.
|
---|
50 | v Insert the version of the OS, eg. the build-date etc.</screen></para>
|
---|
51 |
|
---|
52 | </sect1>
|
---|
53 |
|
---|