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