Changeset b06a0085 for chapter07


Ignore:
Timestamp:
03/04/2013 09:46:36 PM (11 years ago)
Author:
Matthew Burgess <matthew@…>
Branches:
7.5-systemd, 7.6-systemd, 7.7-systemd, 7.8-systemd, 7.9-systemd
Children:
af1c0f0
Parents:
4818ca8
Message:

Document how to configure the virtual console under Systemd.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10192 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/console.xml

    r4818ca8 rb06a0085  
    1616  </indexterm>
    1717
    18   <para>This section discusses how to configure the <command>console</command>
    19   bootscript that sets up the keyboard map, console font and console kernel log
    20   level. If non-ASCII characters (e.g., the copyright sign, the British pound
    21   sign and Euro symbol) will not be used and the keyboard is a U.S. one, much
    22   of this section can be skipped. Without the configuration file, (or
    23   equivalent settings in <filename>rc.site</filename>), the
    24   <command>console</command> bootscript will do nothing.</para>
     18  <para>This section discusses how to configure the
     19  <command>systemd-vconsole-setup</command> system service, which configures
     20  the virtual console font and console keymap.</para>
    2521
    26   <para>The <command>console</command> script reads the
    27   <filename>/etc/sysconfig/console</filename> file for configuration
     22  <para>The <command>systemd-vconsole-setup</command> service reads the
     23  <filename>/etc/vconsole.conf</filename> file for configuration
    2824  information.  Decide which keymap and screen font will be used. Various
    2925  language-specific HOWTOs can also help with this, see <ulink
     
    3430  arguments for these programs.</para>
    3531
    36   <para>The <filename>/etc/sysconfig/console</filename> file should contain lines
     32  <para>The <filename>/etc/vconsole.conf</filename> file should contain lines
    3733  of the form: VARIABLE="value". The following variables are recognized:</para>
    3834
     
    4036
    4137    <varlistentry>
    42       <term>LOGLEVEL</term>
     38      <term>KEYMAP</term>
    4339      <listitem>
    44         <para>This variable specifies the log level for kernel messages sent
    45         to the console as set by <command>dmesg</command>. Valid levels are
    46         from "1" (no messages) to "8". The default level is "7".</para>
     40        <para>This variable specifies the key mapping table for the keyboard. If
     41        unset, it defaults to <literal>us</literal>.</para>
    4742      </listitem>
    4843    </varlistentry>
    4944
    5045    <varlistentry>
    51       <term>KEYMAP</term>
     46      <term>KEYMAP_TOGGLE</term>
    5247      <listitem>
    53         <para>This variable specifies the arguments for the
    54         <command>loadkeys</command> program, typically, the name of keymap
    55         to load, e.g., <quote>es</quote>. If this variable is not set, the
    56         bootscript will not run the <command>loadkeys</command> program,
    57         and the default kernel keymap will be used.</para>
    58       </listitem>
    59     </varlistentry>
    60 
    61     <varlistentry>
    62       <term>KEYMAP_CORRECTIONS</term>
    63       <listitem>
    64         <para>This (rarely used) variable
    65         specifies the arguments for the second call to the
    66         <command>loadkeys</command> program. This is useful if the stock keymap
    67         is not completely satisfactory and a small adjustment has to be made. E.g.,
    68         to include the Euro sign into a keymap that normally doesn't have it,
    69         set this variable to <quote>euro2</quote>.</para>
     48        <para>This variable can be used to configure a second toggle keymap and
     49        is unset by default.</para>
    7050      </listitem>
    7151    </varlistentry>
     
    7454      <term>FONT</term>
    7555      <listitem>
    76         <para>This variable specifies the arguments for the
    77         <command>setfont</command> program. Typically, this includes the font
    78         name, <quote>-m</quote>, and the name of the application character
    79         map to load. E.g., in order to load the <quote>lat1-16</quote> font
    80         together with the <quote>8859-1</quote> application character map
    81         (as it is appropriate in the USA),
    82         <!-- because of the copyright sign -->
    83         set this variable to <quote>lat1-16 -m 8859-1</quote>.
    84         In UTF-8 mode, the kernel uses the application character map for
    85         conversion of composed 8-bit key codes in the keymap to UTF-8, and thus
    86         the argument of the "-m" parameter should be set to the encoding of the
    87         composed key codes in the keymap.</para>
    88 
     56        <para>This variable specifies the font used by the virtual
     57        console.</para>
    8958      </listitem>
    9059    </varlistentry>
    9160
    9261    <varlistentry>
    93       <term>UNICODE</term>
     62      <term>FONT_MAP</term>
    9463      <listitem>
    95         <para>Set this variable to <quote>1</quote>, <quote>yes</quote> or
    96         <quote>true</quote> in order to put the
    97         console into UTF-8 mode. This is useful in UTF-8 based locales and
    98         harmful otherwise.</para>
     64        <para>This variable specifies the console map to be used.</para>
    9965      </listitem>
    10066    </varlistentry>
    10167
    10268    <varlistentry>
    103       <term>LEGACY_CHARSET</term>
     69      <term>FONT_UNIMAP</term>
    10470      <listitem>
    105         <para>For many keyboard layouts, there is no stock Unicode keymap in
    106         the Kbd package. The <command>console</command> bootscript will
    107         convert an available keymap to UTF-8 on the fly if this variable is
    108         set to the encoding of the available non-UTF-8 keymap.</para>
     71        <para>This variable specifies the unicode font map.</para>
    10972      </listitem>
    11073    </varlistentry>
     
    11275  </variablelist>
    11376
    114   <para>Some examples:</para>
     77  <para>An example for a German keyboard and console is given below:</para>
    11578
    116   <itemizedlist>
    117 
    118     <listitem>
    119       <para>For a non-Unicode setup, only the KEYMAP and FONT variables are
    120       generally needed. E.g., for a Polish setup, one would use:</para>
    121 
    122 <screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
    123 <literal># Begin /etc/sysconfig/console
    124 
    125 KEYMAP="pl2"
    126 FONT="lat2a-16 -m 8859-2"
    127 
    128 # End /etc/sysconfig/console</literal>
     79<screen role="nodump"><userinput>cat &gt; /etc/vconsole.conf &lt;&lt; "EOF"
     80<literal>KEYMAP=de-latin1
     81FONT=latarcyrheb-sun16</literal>
    12982EOF</userinput></screen>
    130     </listitem>
    131 
    132     <listitem>
    133       <para>As mentioned above, it is sometimes necessary to adjust a
    134       stock keymap slightly. The following example adds the Euro symbol to the
    135       German keymap:</para>
    136 
    137 <screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
    138 <literal># Begin /etc/sysconfig/console
    139 
    140 KEYMAP="de-latin1"
    141 KEYMAP_CORRECTIONS="euro2"
    142 FONT="lat0-16 -m 8859-15"
    143 
    144 # End /etc/sysconfig/console</literal>
    145 EOF</userinput></screen>
    146     </listitem>
    147 
    148     <listitem>
    149       <para>The following is a Unicode-enabled example for Bulgarian, where a
    150       stock UTF-8 keymap exists:</para>
    151 
    152 <screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
    153 <literal># Begin /etc/sysconfig/console
    154 
    155 UNICODE="1"
    156 KEYMAP="bg_bds-utf8"
    157 FONT="LatArCyrHeb-16"
    158 
    159 # End /etc/sysconfig/console</literal>
    160 EOF</userinput></screen>
    161     </listitem>
    162 
    163     <listitem>
    164       <para>Due to the use of a 512-glyph LatArCyrHeb-16 font in the previous
    165       example, bright colors are no longer available on the Linux console unless
    166       a framebuffer is used. If one wants to have bright colors without
    167       framebuffer and can live without characters not belonging to his language,
    168       it is still possible to use a language-specific 256-glyph font, as
    169       illustrated below:</para>
    170 
    171 <screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
    172 <literal># Begin /etc/sysconfig/console
    173 
    174 UNICODE="1"
    175 KEYMAP="bg_bds-utf8"
    176 FONT="cyr-sun16"
    177 
    178 # End /etc/sysconfig/console</literal>
    179 EOF</userinput></screen>
    180     </listitem>
    181 
    182     <listitem>
    183       <para>The following example illustrates keymap autoconversion from
    184       ISO-8859-15 to UTF-8 and enabling dead keys in Unicode mode:</para>
    185 
    186 <screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
    187 <literal># Begin /etc/sysconfig/console
    188 
    189 UNICODE="1"
    190 KEYMAP="de-latin1"
    191 KEYMAP_CORRECTIONS="euro2"
    192 LEGACY_CHARSET="iso-8859-15"
    193 FONT="LatArCyrHeb-16 -m 8859-15"
    194 
    195 # End /etc/sysconfig/console</literal>
    196 EOF</userinput></screen>
    197     </listitem>
    198 
    199     <listitem>
    200       <para>Some keymaps have dead keys (i.e., keys that don't produce a
    201       character by themselves, but put an accent on the character produced
    202       by the next key) or define composition rules (such as: <quote>press
    203       Ctrl+. A E to get &AElig;</quote> in the default keymap).
    204       Linux-&linux-version; interprets dead keys and composition rules in the
    205       keymap correctly only when the source characters to be composed together
    206       are not multibyte. This deficiency doesn't affect keymaps for European
    207       languages, because there accents are added to unaccented ASCII
    208       characters, or two ASCII characters are composed together. However, in
    209       UTF-8 mode it is a problem, e.g., for the Greek language, where one
    210       sometimes needs to put an accent on the letter <quote>alpha</quote>.
    211       The solution is either to avoid the use of UTF-8, or to install the
    212       X window system that doesn't have this limitation in its input
    213       handling.</para>
    214     </listitem>
    215 
    216     <listitem>
    217       <para>For Chinese, Japanese, Korean and some other languages, the Linux
    218       console cannot be configured to display the needed characters. Users
    219       who need such languages should install the X Window System, fonts that
    220       cover the necessary character ranges, and the proper input method (e.g.,
    221       SCIM, it supports a wide variety of languages).</para>
    222     </listitem>
    223 
    224   </itemizedlist>
    22583
    22684  <!-- Added because folks keep posting their console file with X questions
    22785  to blfs-support list -->
    22886  <note>
    229     <para>The <filename>/etc/sysconfig/console</filename> file only controls the    Linux text console localization. It has nothing to do with setting the
    230     proper keyboard layout and terminal fonts in the X Window System, with ssh
    231     sessions or with a serial console. In such situations, limitations mentioned
    232     in the last two list items above do not apply.</para>
     87    <para>The <filename>/etc/vconsole.conf</filename> file only controls
     88    localization of the Linux text console. It has nothing to do with setting
     89    the proper keyboard layout and terminal fonts in the X Window System, with
     90    ssh sessions, or with a serial console.</para>
    23391  </note>
    23492
Note: See TracChangeset for help on using the changeset viewer.