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