mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-07-18 18:25:08 +01:00
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
This commit is contained in:
parent
4818ca80e8
commit
b06a008517
@ -36,6 +36,16 @@
|
||||
</listitem>
|
||||
-->
|
||||
|
||||
<listitem>
|
||||
<para>2013-03-04</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>[matthew] - Document how to configure the virtual console under
|
||||
Systemd.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>2013-03-03</para>
|
||||
<itemizedlist>
|
||||
|
@ -15,16 +15,12 @@
|
||||
<secondary>configuring</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>This section discusses how to configure the <command>console</command>
|
||||
bootscript that sets up the keyboard map, console font and console kernel log
|
||||
level. If non-ASCII characters (e.g., the copyright sign, the British pound
|
||||
sign and Euro symbol) will not be used and the keyboard is a U.S. one, much
|
||||
of this section can be skipped. Without the configuration file, (or
|
||||
equivalent settings in <filename>rc.site</filename>), the
|
||||
<command>console</command> bootscript will do nothing.</para>
|
||||
<para>This section discusses how to configure the
|
||||
<command>systemd-vconsole-setup</command> system service, which configures
|
||||
the virtual console font and console keymap.</para>
|
||||
|
||||
<para>The <command>console</command> script reads the
|
||||
<filename>/etc/sysconfig/console</filename> file for configuration
|
||||
<para>The <command>systemd-vconsole-setup</command> service reads the
|
||||
<filename>/etc/vconsole.conf</filename> file for configuration
|
||||
information. Decide which keymap and screen font will be used. Various
|
||||
language-specific HOWTOs can also help with this, see <ulink
|
||||
url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. If still in
|
||||
@ -33,203 +29,65 @@
|
||||
<filename>setfont(8)</filename> manual pages to determine the correct
|
||||
arguments for these programs.</para>
|
||||
|
||||
<para>The <filename>/etc/sysconfig/console</filename> file should contain lines
|
||||
<para>The <filename>/etc/vconsole.conf</filename> file should contain lines
|
||||
of the form: VARIABLE="value". The following variables are recognized:</para>
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>LOGLEVEL</term>
|
||||
<listitem>
|
||||
<para>This variable specifies the log level for kernel messages sent
|
||||
to the console as set by <command>dmesg</command>. Valid levels are
|
||||
from "1" (no messages) to "8". The default level is "7".</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>KEYMAP</term>
|
||||
<listitem>
|
||||
<para>This variable specifies the arguments for the
|
||||
<command>loadkeys</command> program, typically, the name of keymap
|
||||
to load, e.g., <quote>es</quote>. If this variable is not set, the
|
||||
bootscript will not run the <command>loadkeys</command> program,
|
||||
and the default kernel keymap will be used.</para>
|
||||
<para>This variable specifies the key mapping table for the keyboard. If
|
||||
unset, it defaults to <literal>us</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>KEYMAP_CORRECTIONS</term>
|
||||
<term>KEYMAP_TOGGLE</term>
|
||||
<listitem>
|
||||
<para>This (rarely used) variable
|
||||
specifies the arguments for the second call to the
|
||||
<command>loadkeys</command> program. This is useful if the stock keymap
|
||||
is not completely satisfactory and a small adjustment has to be made. E.g.,
|
||||
to include the Euro sign into a keymap that normally doesn't have it,
|
||||
set this variable to <quote>euro2</quote>.</para>
|
||||
<para>This variable can be used to configure a second toggle keymap and
|
||||
is unset by default.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>FONT</term>
|
||||
<listitem>
|
||||
<para>This variable specifies the arguments for the
|
||||
<command>setfont</command> program. Typically, this includes the font
|
||||
name, <quote>-m</quote>, and the name of the application character
|
||||
map to load. E.g., in order to load the <quote>lat1-16</quote> font
|
||||
together with the <quote>8859-1</quote> application character map
|
||||
(as it is appropriate in the USA),
|
||||
<!-- because of the copyright sign -->
|
||||
set this variable to <quote>lat1-16 -m 8859-1</quote>.
|
||||
In UTF-8 mode, the kernel uses the application character map for
|
||||
conversion of composed 8-bit key codes in the keymap to UTF-8, and thus
|
||||
the argument of the "-m" parameter should be set to the encoding of the
|
||||
composed key codes in the keymap.</para>
|
||||
|
||||
<para>This variable specifies the font used by the virtual
|
||||
console.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>UNICODE</term>
|
||||
<term>FONT_MAP</term>
|
||||
<listitem>
|
||||
<para>Set this variable to <quote>1</quote>, <quote>yes</quote> or
|
||||
<quote>true</quote> in order to put the
|
||||
console into UTF-8 mode. This is useful in UTF-8 based locales and
|
||||
harmful otherwise.</para>
|
||||
<para>This variable specifies the console map to be used.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>LEGACY_CHARSET</term>
|
||||
<term>FONT_UNIMAP</term>
|
||||
<listitem>
|
||||
<para>For many keyboard layouts, there is no stock Unicode keymap in
|
||||
the Kbd package. The <command>console</command> bootscript will
|
||||
convert an available keymap to UTF-8 on the fly if this variable is
|
||||
set to the encoding of the available non-UTF-8 keymap.</para>
|
||||
<para>This variable specifies the unicode font map.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Some examples:</para>
|
||||
<para>An example for a German keyboard and console is given below:</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>For a non-Unicode setup, only the KEYMAP and FONT variables are
|
||||
generally needed. E.g., for a Polish setup, one would use:</para>
|
||||
|
||||
<screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"
|
||||
<literal># Begin /etc/sysconfig/console
|
||||
|
||||
KEYMAP="pl2"
|
||||
FONT="lat2a-16 -m 8859-2"
|
||||
|
||||
# End /etc/sysconfig/console</literal>
|
||||
<screen role="nodump"><userinput>cat > /etc/vconsole.conf << "EOF"
|
||||
<literal>KEYMAP=de-latin1
|
||||
FONT=latarcyrheb-sun16</literal>
|
||||
EOF</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>As mentioned above, it is sometimes necessary to adjust a
|
||||
stock keymap slightly. The following example adds the Euro symbol to the
|
||||
German keymap:</para>
|
||||
|
||||
<screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"
|
||||
<literal># Begin /etc/sysconfig/console
|
||||
|
||||
KEYMAP="de-latin1"
|
||||
KEYMAP_CORRECTIONS="euro2"
|
||||
FONT="lat0-16 -m 8859-15"
|
||||
|
||||
# End /etc/sysconfig/console</literal>
|
||||
EOF</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>The following is a Unicode-enabled example for Bulgarian, where a
|
||||
stock UTF-8 keymap exists:</para>
|
||||
|
||||
<screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"
|
||||
<literal># Begin /etc/sysconfig/console
|
||||
|
||||
UNICODE="1"
|
||||
KEYMAP="bg_bds-utf8"
|
||||
FONT="LatArCyrHeb-16"
|
||||
|
||||
# End /etc/sysconfig/console</literal>
|
||||
EOF</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Due to the use of a 512-glyph LatArCyrHeb-16 font in the previous
|
||||
example, bright colors are no longer available on the Linux console unless
|
||||
a framebuffer is used. If one wants to have bright colors without
|
||||
framebuffer and can live without characters not belonging to his language,
|
||||
it is still possible to use a language-specific 256-glyph font, as
|
||||
illustrated below:</para>
|
||||
|
||||
<screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"
|
||||
<literal># Begin /etc/sysconfig/console
|
||||
|
||||
UNICODE="1"
|
||||
KEYMAP="bg_bds-utf8"
|
||||
FONT="cyr-sun16"
|
||||
|
||||
# End /etc/sysconfig/console</literal>
|
||||
EOF</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>The following example illustrates keymap autoconversion from
|
||||
ISO-8859-15 to UTF-8 and enabling dead keys in Unicode mode:</para>
|
||||
|
||||
<screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"
|
||||
<literal># Begin /etc/sysconfig/console
|
||||
|
||||
UNICODE="1"
|
||||
KEYMAP="de-latin1"
|
||||
KEYMAP_CORRECTIONS="euro2"
|
||||
LEGACY_CHARSET="iso-8859-15"
|
||||
FONT="LatArCyrHeb-16 -m 8859-15"
|
||||
|
||||
# End /etc/sysconfig/console</literal>
|
||||
EOF</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Some keymaps have dead keys (i.e., keys that don't produce a
|
||||
character by themselves, but put an accent on the character produced
|
||||
by the next key) or define composition rules (such as: <quote>press
|
||||
Ctrl+. A E to get Æ</quote> in the default keymap).
|
||||
Linux-&linux-version; interprets dead keys and composition rules in the
|
||||
keymap correctly only when the source characters to be composed together
|
||||
are not multibyte. This deficiency doesn't affect keymaps for European
|
||||
languages, because there accents are added to unaccented ASCII
|
||||
characters, or two ASCII characters are composed together. However, in
|
||||
UTF-8 mode it is a problem, e.g., for the Greek language, where one
|
||||
sometimes needs to put an accent on the letter <quote>alpha</quote>.
|
||||
The solution is either to avoid the use of UTF-8, or to install the
|
||||
X window system that doesn't have this limitation in its input
|
||||
handling.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>For Chinese, Japanese, Korean and some other languages, the Linux
|
||||
console cannot be configured to display the needed characters. Users
|
||||
who need such languages should install the X Window System, fonts that
|
||||
cover the necessary character ranges, and the proper input method (e.g.,
|
||||
SCIM, it supports a wide variety of languages).</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
<!-- Added because folks keep posting their console file with X questions
|
||||
to blfs-support list -->
|
||||
<note>
|
||||
<para>The <filename>/etc/sysconfig/console</filename> file only controls the Linux text console localization. It has nothing to do with setting the
|
||||
proper keyboard layout and terminal fonts in the X Window System, with ssh
|
||||
sessions or with a serial console. In such situations, limitations mentioned
|
||||
in the last two list items above do not apply.</para>
|
||||
<para>The <filename>/etc/vconsole.conf</filename> file only controls
|
||||
localization of the Linux text console. It has nothing to do with setting
|
||||
the proper keyboard layout and terminal fonts in the X Window System, with
|
||||
ssh sessions, or with a serial console.</para>
|
||||
</note>
|
||||
|
||||
</sect1>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!ENTITY version "SYSTEMD-20130303">
|
||||
<!ENTITY releasedate "March 3, 2013">
|
||||
<!ENTITY version "SYSTEMD-20130304">
|
||||
<!ENTITY releasedate "March 4, 2013">
|
||||
<!ENTITY copyrightdate "1999-2013"><!-- jhalfs needs a literal dash, not – -->
|
||||
<!ENTITY milestone "7.3">
|
||||
<!ENTITY generic-version "systemd"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
|
||||
|
Loading…
Reference in New Issue
Block a user