|
@@ -1,4 +1,4 @@
|
|
-<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
@@ -8,95 +8,98 @@
|
|
<sect1 id="ch-scripts-console" revision="systemd">
|
|
<sect1 id="ch-scripts-console" revision="systemd">
|
|
<?dbhtml filename="console.html"?>
|
|
<?dbhtml filename="console.html"?>
|
|
|
|
|
|
- <title>Configuring the Linux Console</title>
|
|
|
|
|
|
+ <title>配置 Linux 终端</title>
|
|
|
|
|
|
<indexterm zone="ch-scripts-console">
|
|
<indexterm zone="ch-scripts-console">
|
|
<primary sortas="d-console">console</primary>
|
|
<primary sortas="d-console">console</primary>
|
|
<secondary>configuring</secondary>
|
|
<secondary>configuring</secondary>
|
|
</indexterm>
|
|
</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="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>.
|
|
|
|
- Examine <command>localectl list-keymaps</command> output for a list of
|
|
|
|
- valid console keymaps. Look in
|
|
|
|
- <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: VARIABLE="value". The following variables are recognized:</para>
|
|
|
|
|
|
+ <note><title>译注</title>
|
|
|
|
+ <para>字符终端从本质上说无法处理中文,因此作为中文读者,
|
|
|
|
+ 除非您学习小语种,或者拥有 DVORAK 之类非传统布局的键盘,
|
|
|
|
+ 都可以跳过本节,使用默认的英文键盘和终端设置。</para>
|
|
|
|
+ </note>
|
|
|
|
+
|
|
|
|
+ <para>本节讨论如何配置
|
|
|
|
+ <command>systemd-vconsole-setup</command> 系统服务,
|
|
|
|
+ 它负责配置虚拟终端字体和终端键盘映射。</para>
|
|
|
|
+
|
|
|
|
+ <para><command>systemd-vconsole-setup</command> 服务从
|
|
|
|
+ <filename>/etc/vconsole.conf</filename> 文件中读取配置信息,
|
|
|
|
+ 并确定使用的键盘映射和屏幕字体。一些语言相关的 HOWTO
|
|
|
|
+ 文档能帮助您配置该文件,参阅
|
|
|
|
+ <ulink url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>。
|
|
|
|
+ 浏览 <command>localectl list-keymaps</command>
|
|
|
|
+ 输出的所有可用终端键盘映射列表,并在
|
|
|
|
+ <filename class="directory">/usr/share/consolefonts</filename>
|
|
|
|
+ 中查找可用的屏幕字体。</para>
|
|
|
|
+
|
|
|
|
+ <para><filename>/etc/vconsole.conf</filename> 文件的每一行都应该是
|
|
|
|
+ 变量名="值" 的形式,以下是有效的变量名:</para>
|
|
|
|
|
|
<variablelist>
|
|
<variablelist>
|
|
|
|
|
|
<varlistentry>
|
|
<varlistentry>
|
|
<term>KEYMAP</term>
|
|
<term>KEYMAP</term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>This variable specifies the key mapping table for the keyboard. If
|
|
|
|
- unset, it defaults to <literal>us</literal>.</para>
|
|
|
|
|
|
+ <para>该变量指定键盘映射表名。如果没有设定,默认值是
|
|
|
|
+ <literal>us</literal>。</para>
|
|
</listitem>
|
|
</listitem>
|
|
</varlistentry>
|
|
</varlistentry>
|
|
|
|
|
|
<varlistentry>
|
|
<varlistentry>
|
|
<term>KEYMAP_TOGGLE</term>
|
|
<term>KEYMAP_TOGGLE</term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>This variable can be used to configure a second toggle keymap and
|
|
|
|
- is unset by default.</para>
|
|
|
|
|
|
+ <para>该变量指定第二切换键盘映射,默认情况下未设定。</para>
|
|
</listitem>
|
|
</listitem>
|
|
</varlistentry>
|
|
</varlistentry>
|
|
|
|
|
|
<varlistentry>
|
|
<varlistentry>
|
|
<term>FONT</term>
|
|
<term>FONT</term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>This variable specifies the font used by the virtual
|
|
|
|
- console.</para>
|
|
|
|
|
|
+ <para>该变量指定虚拟终端使用的字体。</para>
|
|
</listitem>
|
|
</listitem>
|
|
</varlistentry>
|
|
</varlistentry>
|
|
|
|
|
|
<varlistentry>
|
|
<varlistentry>
|
|
<term>FONT_MAP</term>
|
|
<term>FONT_MAP</term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>This variable specifies the console map to be used.</para>
|
|
|
|
|
|
+ <para>该变量指定要使用的终端映射。</para>
|
|
</listitem>
|
|
</listitem>
|
|
</varlistentry>
|
|
</varlistentry>
|
|
|
|
|
|
<varlistentry>
|
|
<varlistentry>
|
|
<term>FONT_UNIMAP</term>
|
|
<term>FONT_UNIMAP</term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>This variable specifies the Unicode font map.</para>
|
|
|
|
|
|
+ <para>该变量指定 Unicode 字体映射。</para>
|
|
</listitem>
|
|
</listitem>
|
|
</varlistentry>
|
|
</varlistentry>
|
|
|
|
|
|
</variablelist>
|
|
</variablelist>
|
|
|
|
|
|
- <para>An example for a German keyboard and console is given below:</para>
|
|
|
|
|
|
+ <para>下面是使用德语键盘和控制台的例子:</para>
|
|
|
|
|
|
<screen role="nodump"><userinput>cat > /etc/vconsole.conf << "EOF"
|
|
<screen role="nodump"><userinput>cat > /etc/vconsole.conf << "EOF"
|
|
<literal>KEYMAP=de-latin1
|
|
<literal>KEYMAP=de-latin1
|
|
FONT=Lat2-Terminus16</literal>
|
|
FONT=Lat2-Terminus16</literal>
|
|
EOF</userinput></screen>
|
|
EOF</userinput></screen>
|
|
|
|
|
|
- <para>You can change KEYMAP value at runtime by using the
|
|
|
|
- <command>localectl</command> utility:</para>
|
|
|
|
|
|
+ <para>您可以在运行时使用
|
|
|
|
+ <command>localectl</command> 工具更改 KEYMAP 值:</para>
|
|
|
|
|
|
<screen role="nodump"><userinput>localectl set-keymap MAP</userinput></screen>
|
|
<screen role="nodump"><userinput>localectl set-keymap MAP</userinput></screen>
|
|
|
|
|
|
- <note><para>Please note that the <command>localectl</command> command can
|
|
|
|
- be used only on a system booted with systemd.</para></note>
|
|
|
|
|
|
+ <note><para>请注意, <command>localectl</command> 命令只能用于
|
|
|
|
+ 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>
|
|
|
|
|
|
+ <para>您也可以使用 <command>localectl</command> 工具的对应参数,
|
|
|
|
+ 修改 X11 的键盘布局、模型、变形和选项:</para>
|
|
|
|
|
|
<screen role="nodump"><userinput>localectl set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]</userinput></screen>
|
|
<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>为了列出 <command>localectl set-x11-keymap</command> 可用的所有值,
|
|
|
|
+ 用以下参数运行 <command>localectl</command>:
|
|
</para>
|
|
</para>
|
|
|
|
|
|
<variablelist>
|
|
<variablelist>
|
|
@@ -104,34 +107,36 @@ EOF</userinput></screen>
|
|
<varlistentry>
|
|
<varlistentry>
|
|
<term>list-x11-keymap-models</term>
|
|
<term>list-x11-keymap-models</term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>Show known X11 keyboard mapping models.</para>
|
|
|
|
|
|
+ <para>显示已知的 X11 键盘映射模型。</para>
|
|
</listitem>
|
|
</listitem>
|
|
</varlistentry>
|
|
</varlistentry>
|
|
|
|
|
|
<varlistentry>
|
|
<varlistentry>
|
|
<term>list-x11-keymap-layouts</term>
|
|
<term>list-x11-keymap-layouts</term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>Show known X11 keyboard mapping layouts.</para>
|
|
|
|
|
|
+ <para>显示已知的 X11 键盘映射布局。</para>
|
|
</listitem>
|
|
</listitem>
|
|
</varlistentry>
|
|
</varlistentry>
|
|
|
|
|
|
<varlistentry>
|
|
<varlistentry>
|
|
<term>list-x11-keymap-variants</term>
|
|
<term>list-x11-keymap-variants</term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>Show known X11 keyboard mapping variants.</para>
|
|
|
|
|
|
+ <para>显示已知的 X11 键盘映射变形。</para>
|
|
</listitem>
|
|
</listitem>
|
|
</varlistentry>
|
|
</varlistentry>
|
|
|
|
|
|
<varlistentry>
|
|
<varlistentry>
|
|
<term>list-x11-keymap-options</term>
|
|
<term>list-x11-keymap-options</term>
|
|
<listitem>
|
|
<listitem>
|
|
- <para>Show known X11 keyboard mapping options.</para>
|
|
|
|
|
|
+ <para>显示已知的 X11 键盘映射选项。</para>
|
|
</listitem>
|
|
</listitem>
|
|
</varlistentry>
|
|
</varlistentry>
|
|
|
|
|
|
</variablelist>
|
|
</variablelist>
|
|
|
|
|
|
- <note><para>Using any of the parameters listed above requires the
|
|
|
|
- XKeyboard Config package from BLFS.</para></note>
|
|
|
|
|
|
+ <note><para>如果要使用上述参数,需要先安装 BLFS 的
|
|
|
|
+ <ulink url="&blfs-root;x/xkeyboard-config.html">XKeyboardConfig</ulink>
|
|
|
|
+ 软件包。
|
|
|
|
+ </para></note>
|
|
|
|
|
|
</sect1>
|
|
</sect1>
|