- Timestamp:
- 03/04/2013 09:46:36 PM (11 years ago)
- Branches:
- 7.5-systemd, 7.6-systemd, 7.7-systemd, 7.8-systemd, 7.9-systemd
- Children:
- af1c0f0
- Parents:
- 4818ca8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/console.xml
r4818ca8 rb06a0085 16 16 </indexterm> 17 17 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> 25 21 26 <para>The <command> console</command> scriptreads the27 <filename>/etc/ sysconfig/console</filename> file for configuration22 <para>The <command>systemd-vconsole-setup</command> service reads the 23 <filename>/etc/vconsole.conf</filename> file for configuration 28 24 information. Decide which keymap and screen font will be used. Various 29 25 language-specific HOWTOs can also help with this, see <ulink … … 34 30 arguments for these programs.</para> 35 31 36 <para>The <filename>/etc/ sysconfig/console</filename> file should contain lines32 <para>The <filename>/etc/vconsole.conf</filename> file should contain lines 37 33 of the form: VARIABLE="value". The following variables are recognized:</para> 38 34 … … 40 36 41 37 <varlistentry> 42 <term> LOGLEVEL</term>38 <term>KEYMAP</term> 43 39 <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> 47 42 </listitem> 48 43 </varlistentry> 49 44 50 45 <varlistentry> 51 <term>KEYMAP </term>46 <term>KEYMAP_TOGGLE</term> 52 47 <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> 70 50 </listitem> 71 51 </varlistentry> … … 74 54 <term>FONT</term> 75 55 <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> 89 58 </listitem> 90 59 </varlistentry> 91 60 92 61 <varlistentry> 93 <term> UNICODE</term>62 <term>FONT_MAP</term> 94 63 <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> 99 65 </listitem> 100 66 </varlistentry> 101 67 102 68 <varlistentry> 103 <term> LEGACY_CHARSET</term>69 <term>FONT_UNIMAP</term> 104 70 <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> 109 72 </listitem> 110 73 </varlistentry> … … 112 75 </variablelist> 113 76 114 <para> Some examples:</para>77 <para>An example for a German keyboard and console is given below:</para> 115 78 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 > /etc/sysconfig/console << "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 > /etc/vconsole.conf << "EOF" 80 <literal>KEYMAP=de-latin1 81 FONT=latarcyrheb-sun16</literal> 129 82 EOF</userinput></screen> 130 </listitem>131 132 <listitem>133 <para>As mentioned above, it is sometimes necessary to adjust a134 stock keymap slightly. The following example adds the Euro symbol to the135 German keymap:</para>136 137 <screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"138 <literal># Begin /etc/sysconfig/console139 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 a150 stock UTF-8 keymap exists:</para>151 152 <screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"153 <literal># Begin /etc/sysconfig/console154 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 previous165 example, bright colors are no longer available on the Linux console unless166 a framebuffer is used. If one wants to have bright colors without167 framebuffer and can live without characters not belonging to his language,168 it is still possible to use a language-specific 256-glyph font, as169 illustrated below:</para>170 171 <screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"172 <literal># Begin /etc/sysconfig/console173 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 from184 ISO-8859-15 to UTF-8 and enabling dead keys in Unicode mode:</para>185 186 <screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"187 <literal># Begin /etc/sysconfig/console188 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 a201 character by themselves, but put an accent on the character produced202 by the next key) or define composition rules (such as: <quote>press203 Ctrl+. A E to get Æ</quote> in the default keymap).204 Linux-&linux-version; interprets dead keys and composition rules in the205 keymap correctly only when the source characters to be composed together206 are not multibyte. This deficiency doesn't affect keymaps for European207 languages, because there accents are added to unaccented ASCII208 characters, or two ASCII characters are composed together. However, in209 UTF-8 mode it is a problem, e.g., for the Greek language, where one210 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 the212 X window system that doesn't have this limitation in its input213 handling.</para>214 </listitem>215 216 <listitem>217 <para>For Chinese, Japanese, Korean and some other languages, the Linux218 console cannot be configured to display the needed characters. Users219 who need such languages should install the X Window System, fonts that220 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>225 83 226 84 <!-- Added because folks keep posting their console file with X questions 227 85 to blfs-support list --> 228 86 <note> 229 <para>The <filename>/etc/ sysconfig/console</filename> file only controls the Linux text console localization. It has nothing to do with setting the230 proper keyboard layout and terminal fonts in the X Window System, with ssh231 sessions or with a serial console. In such situations, limitations mentioned232 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> 233 91 </note> 234 92
Note:
See TracChangeset
for help on using the changeset viewer.