mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-18 13:07:50 +00:00
160 lines
5.6 KiB
XML
160 lines
5.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
%general-entities;
|
|
]>
|
|
|
|
<sect1 id="ch-config-console" revision="systemd">
|
|
<?dbhtml filename="console.html"?>
|
|
|
|
<title>Configuring the Linux Console</title>
|
|
|
|
<indexterm zone="ch-config-console">
|
|
<primary sortas="d-console">console</primary>
|
|
<secondary>configuring</secondary>
|
|
</indexterm>
|
|
|
|
<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>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="https://tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>.
|
|
Examine the output of <command>localectl list-keymaps</command> for a list of
|
|
valid console keymaps. Look in the
|
|
<filename class="directory">/usr/share/consolefonts</filename>
|
|
directory for valid screen fonts.</para>
|
|
|
|
<para>The <filename>/etc/vconsole.conf</filename> file should contain lines
|
|
of the form: <envar>VARIABLE=value</envar>. The following variables are recognized:</para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
<term>KEYMAP</term>
|
|
<listitem>
|
|
<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_TOGGLE</term>
|
|
<listitem>
|
|
<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 font used by the virtual
|
|
console.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>FONT_MAP</term>
|
|
<listitem>
|
|
<para>This variable specifies the console map to be used.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>FONT_UNIMAP</term>
|
|
<listitem>
|
|
<para>This variable specifies the Unicode font map.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
<para>We'll use <literal>C.UTF-8</literal> as the locale for interactive
|
|
sessions in the Linux console in <xref role='.'
|
|
linkend='ch-config-locale'/> The console fonts shipped by
|
|
the <application>Kbd</application> package containing the glyphs for
|
|
all characters from the program messages in the <literal>C.UTF-8</literal>
|
|
locale are <filename>LatArCyrHeb*.psfu.gz</filename>,
|
|
<filename>LatGrkCyr*.psfu.gz</filename>,
|
|
<filename>Lat2-Terminus16.psfu.gz</filename>, and
|
|
<filename>pancyrillic.f16.psfu.gz</filename> in
|
|
<filename class='directory'>/usr/share/consolefonts</filename> (the other
|
|
shipped console fonts lack glyphs of some characters like the Unicode
|
|
left/right quotation marks and the Unicode English dash). So set one of
|
|
them, for example <filename>Lat2-Terminus16.psfu.gz</filename> as the
|
|
default console font:</para>
|
|
|
|
<!-- We are using "nodump" for general settings, but not examples. This
|
|
is ironic, but needed for the compatibility with jhalfs! -->
|
|
<screen role='nodump'><userinput>echo <literal>FONT=Lat2-Terminus16</literal> > /etc/vconsole.conf</userinput></screen>
|
|
|
|
<para>An example for a German keyboard and console is given below:</para>
|
|
<!-- This is what is used by jhalfs for creating the vconsole.conf file.
|
|
Whenever you want to change the following, please inform the jhalfs
|
|
maintainer(s). -->
|
|
<screen><userinput>cat > /etc/vconsole.conf << "EOF"
|
|
<literal>KEYMAP=de-latin1
|
|
FONT=Lat2-Terminus16</literal>
|
|
EOF</userinput></screen>
|
|
|
|
<para>You can change KEYMAP value at runtime by using the
|
|
<command>localectl</command> utility:</para>
|
|
|
|
<screen role="nodump"><userinput>localectl set-keymap MAP</userinput></screen>
|
|
|
|
<note><para>Please note that the <command>localectl</command> command
|
|
doesn't work in the chroot environment. It can only
|
|
be used after the LFS system is booted with systemd.</para></note>
|
|
|
|
<para>You can also use <command>localectl</command> utility with the
|
|
corresponding parameters to change X11 keyboard layout, model, variant
|
|
and options:</para>
|
|
|
|
<screen role="nodump"><userinput>localectl set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]</userinput></screen>
|
|
|
|
<para>To list possible values for <command>localectl set-x11-keymap</command>
|
|
parameters, run <command>localectl</command> with parameters listed below:
|
|
</para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
<term>list-x11-keymap-models</term>
|
|
<listitem>
|
|
<para>Shows known X11 keyboard mapping models.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>list-x11-keymap-layouts</term>
|
|
<listitem>
|
|
<para>Shows known X11 keyboard mapping layouts.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>list-x11-keymap-variants</term>
|
|
<listitem>
|
|
<para>Shows known X11 keyboard mapping variants.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>list-x11-keymap-options</term>
|
|
<listitem>
|
|
<para>Shows known X11 keyboard mapping options.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
<note><para>Using any of the parameters listed above requires the
|
|
XKeyboard-Config package from BLFS.</para></note>
|
|
|
|
</sect1>
|