[system-administrators-guide] Replace keyboard file

stephenw stephenw at fedoraproject.org
Tue Dec 9 18:11:00 UTC 2014


commit 7e72b0a8226ae2dd06bd09d92232f411550e6807
Author: Stephen Wadeley <swadeley at redhat.com>
Date:   Tue Dec 9 19:07:56 2014 +0100

    Replace keyboard file
    
    System Locale and Keyboard Configuration
    replaces
    Configuring the Language and Keyboard

 en-US/Configuring_the_Date_and_Time.xml            |    2 +-
 en-US/Configuring_the_Language_and_Keyboard.xml    |  182 -------------
 en-US/Preface.xml                                  |    2 +-
 en-US/System_Administrators_Guide.xml              |    2 +-
 en-US/System_Locale_and_Keyboard_Configuration.xml |  274 ++++++++++++++++++++
 5 files changed, 277 insertions(+), 185 deletions(-)
---
diff --git a/en-US/Configuring_the_Date_and_Time.xml b/en-US/Configuring_the_Date_and_Time.xml
index 051ecb3..580877b 100644
--- a/en-US/Configuring_the_Date_and_Time.xml
+++ b/en-US/Configuring_the_Date_and_Time.xml
@@ -471,7 +471,7 @@ To set the hardware clock to the current system time and keep the hardware clock
     <itemizedlist>
       <listitem>
         <para>
-          <xref linkend="ch-Configuring_the_Language_and_Keyboard" /> documents how to configure the keyboard layout.
+          <xref linkend="ch-System_Locale_and_Keyboard_Configuration" /> documents how to configure the keyboard layout.
         </para>
       </listitem>
       <!--<listitem>
diff --git a/en-US/Preface.xml b/en-US/Preface.xml
index 618ad3d..d25421e 100644
--- a/en-US/Preface.xml
+++ b/en-US/Preface.xml
@@ -47,7 +47,7 @@
             This part covers basic system administration tasks such as keyboard configuration, date and time configuration, and managing users and groups.
           </para>
           <para>
-            <xref linkend="ch-Configuring_the_Language_and_Keyboard" /> covers basic language and keyboard setup. Read this chapter if you need to configure the language of your desktop, change the keyboard layout, or add the keyboard layout indicator to the panel.
+            <xref linkend="ch-System_Locale_and_Keyboard_Configuration" /> covers basic language and keyboard setup. Read this chapter if you need to configure the language of your desktop, change the keyboard layout, or add the keyboard layout indicator to the panel.
           </para>
           <para>
             <xref linkend="ch-Configuring_the_Date_and_Time" /> covers the configuration of the system date and time. Read this chapter if you need to set or change the date and time.
diff --git a/en-US/System_Administrators_Guide.xml b/en-US/System_Administrators_Guide.xml
index 6dfcc56..1abcce6 100644
--- a/en-US/System_Administrators_Guide.xml
+++ b/en-US/System_Administrators_Guide.xml
@@ -15,7 +15,7 @@
       </para>
     </partintro>
     <xi:include href="Opening_GUI_Applications.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-    <xi:include href="Configuring_the_Language_and_Keyboard.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+    <xi:include href="System_Locale_and_Keyboard_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="Configuring_the_Date_and_Time.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="Managing_Users_and_Groups.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <!-- Gaining Privileges -->
diff --git a/en-US/System_Locale_and_Keyboard_Configuration.xml b/en-US/System_Locale_and_Keyboard_Configuration.xml
new file mode 100644
index 0000000..5443882
--- /dev/null
+++ b/en-US/System_Locale_and_Keyboard_Configuration.xml
@@ -0,0 +1,274 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="ch-System_Locale_and_Keyboard_Configuration">
+  <title>System Locale and Keyboard Configuration</title>
+  <indexterm>
+    <primary>keyboard configuration</primary>
+  </indexterm>
+  <para>
+    The <emphasis>system locale</emphasis> specifies the language settings of system services and user interfaces. The <emphasis>keyboard layout</emphasis> settings control the layout used on the text console and graphical user interfaces.
+   </para>
+   <para>
+    These settings can be made by modifying the <filename>/etc/locale.conf</filename> configuration file or by using the <application>localectl</application> utility. Also, you can use the graphical user interface to perform the task; for a description of this method, see <ulink url="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/">Red&nbsp;Hat Enterprise&nbsp;Linux&nbsp;7 Installation Guide</ulink>. 
+  </para>
+  <section id="s1-Setting_the_System_Locale">
+   <title>Setting the System Locale</title>
+    <para>
+    	System-wide locale settings are stored in the <filename>/etc/locale.conf</filename> file, which is read at early boot by the <systemitem class="daemon">systemd</systemitem> daemon. The locale settings configured in <filename>/etc/locale.conf</filename> are inherited by every service or user, unless individual programs or individual users override them.
+    </para>
+    <para>
+    	The basic file format of <filename>/etc/locale.conf</filename> is a newline-separated list of variable assignments. For example, German locale with English messages in <filename>/etc/locale.conf</filename> looks as follows:
+    </para>
+    <screen>
+LANG=de_DE.UTF-8
+LC_MESSAGES=C
+    </screen>
+    <para>
+    	Here, the LC_MESSAGES option determines the locale used for diagnostic messages written to the standard error output. To further specify locale settings in <filename>/etc/locale.conf</filename>, you can use several other options, the most relevant are summarized in <xref linkend="tab-locale_options"/>. See the <systemitem>locale(7)</systemitem> manual page for detailed information on these options. Note that the LC_ALL option, which represents all possible options, should not be configured in <filename>/etc/locale.conf</filename>.
+    </para>
+    <table id="tab-locale_options">
+    <title>Options configurable in /etc/locale.conf</title>
+    <tgroup cols='2' align='left'>
+    	<thead>
+    		<row>
+    			<entry>Option</entry>
+    			<entry>Description</entry>
+    		</row>
+    	</thead>
+    	<tbody>
+    		<row>
+    			<entry>LANG</entry>
+    			<entry>
+    				Provides a default value for the system locale.
+    			</entry>
+    		</row>
+    		<row>
+    			<entry>LC_COLLATE</entry>
+    			<entry>
+    				Changes the behavior of functions which compare strings in the local alphabet.
+    			</entry>
+    		</row>
+    		<row>
+    			<entry>LC_CTYPE</entry>
+    			<entry>
+    				Changes the behavior of the character handling and classification functions and the multibyte character functions.
+    			</entry>
+    		</row>
+    		<row>
+    			<entry>LC_NUMERIC</entry>
+    			<entry>
+    				Describes the way numbers are usually printed, with details such as decimal point versus decimal comma.
+    			</entry>
+    		</row>
+    		<row>
+    			<entry>LC_TIME</entry>
+    			<entry>
+    				Changes the display of the current time, 24-hour versus 12-hour clock.
+    			</entry>
+    		</row>
+    		<row>
+    			<entry> LC_MESSAGES</entry>
+    			<entry>
+    				Determines the locale used for diagnostic messages written to the standard error output.
+    			</entry>
+    		</row>
+    	</tbody>
+    </tgroup>
+    </table>
+   <section id="s2-Displaying_the_Current_Status">
+    <title>Displaying the Current Status</title>
+  	<para>
+  		The <command>localectl</command> command can be used to query and change the system locale and keyboard layout settings. To show the current settings, use the <option>status</option> option:
+  	</para>
+  		<synopsis><command>localectl</command> <option>status</option></synopsis>
+  	  <example>
+  	  	<title>Displaying the Current Status</title>
+  	  	<para>
+  		The output of the previous command lists the currently set locale, keyboard layout configured for the console and for the X11 window system.
+  		</para>
+  		<screen>
+~]$&nbsp;<command>localectl</command> <option>status</option>
+   System Locale: LANG=en_US.UTF-8
+       VC Keymap: us
+      X11 Layout: n/a
+      		</screen>
+      	 </example>
+   </section>
+   <section id="s2-Listing_Available_Locales">
+    <title>Listing Available Locales</title>
+  	<para>
+  		To list all locales available for your system, type:
+  	</para>
+  		<synopsis><command>localectl</command> <option>list-locales</option></synopsis>
+    <example>
+       <title>Listing Locales</title>
+  	<para>
+  		Imagine you want to select a specific English locale, but you are not sure if it is available on the system. You can check that by listing all English locales with the following command:
+  	</para>
+  	<screen>
+~]$&nbsp;<command>localectl</command> <option>list-locales</option> | <command>grep</command> <literal>en_</literal>
+en_AG
+en_AG.utf8
+en_AU
+en_AU.iso88591
+en_AU.utf8
+en_BW
+en_BW.iso88591
+en_BW.utf8
+
+<emphasis>output truncated</emphasis>
+  	</screen>
+    </example>
+  </section>
+  <section id="s2-Setting_the_Locale">
+    <title>Setting the Locale</title>
+  	<para>
+  		To set the default system locale, use the following command as <systemitem class="username">root</systemitem>:
+  	</para>
+  		<synopsis><command>localectl</command> <option>set-locale</option> <option>LANG</option>=<replaceable>locale</replaceable></synopsis>
+  	<para>
+  		Replace <replaceable>locale</replaceable> with the locale name, found with the <command>localectl</command> <option>list-locales</option> command. The above syntax can also be used to configure parameters from <xref linkend="tab-locale_options"/>.
+  	</para>
+     <example>
+       <title>Changing the Default Locale</title>
+  	<para>
+  		For example, if you want to set British English as your default locale, first find the name of this locale by using <option>list-locales</option>. Then, as <systemitem class="username">root</systemitem>, type the command in the following form:
+  	</para>
+  		<synopsis>~]#&nbsp;<command>localectl</command> <option>set-locale</option> <option>LANG</option>=<literal>en_GB.utf8</literal></synopsis>
+  	</example>
+  </section>
+  </section>
+  <section id="s1-Changing_the_Keyboard_Layout">
+  <title>Changing the Keyboard Layout</title>
+    <indexterm>
+      <primary><application>localectl</application></primary>
+      <see>keyboard configuration</see>
+    </indexterm>
+    <indexterm>
+      <primary>keyboard configuration</primary>
+      <secondary>layout</secondary>
+    </indexterm>
+    <para>
+    	The keyboard layout settings enable the user to control the layout used on the text console and graphical user interfaces. 
+    </para>
+    <section id="s2-Displaying_the_Current_Settings">
+     <title>Displaying the Current Settings</title>
+      <para>
+    	As mentioned before, you can check your current keyboard layout configuration with the following command:
+      </para>
+    	<synopsis><command>localectl</command> <option>status</option></synopsis>
+      <example>
+  	  	<title>Displaying the Keyboard Settings</title>
+  	  	<para>
+  		In the following output, you can see the keyboard layout configured for the virtual console and for the X11 window system.
+  		</para>
+  		<screen>
+~]$&nbsp;<command>localectl</command> <option>status</option>
+   System Locale: LANG=en_US.utf8
+       VC Keymap: us
+      X11 Layout: us
+      		</screen>
+      	 </example>
+    	
+    </section>
+    <section id="s2-Listing_Available_Keymaps">
+     <title>Listing Available Keymaps</title>
+      <para>
+    	To list all available keyboard layouts that can be configured on your system, type:
+      </para>
+    	<synopsis><command>localectl</command> <option>list-keymaps</option></synopsis>
+      <example>
+      	<title>Searching for a Particular Keymap</title>
+    	<para>
+    	You can use <command>grep</command> to search the output of the previous command for a specific keymap name. There are often multiple keymaps compatible with your currently set locale. For example, to find available Czech keyboard layouts, type:
+      </para>
+      <screen>
+~]$&nbsp;<command>localectl</command> <option>list-keymaps</option> | <command>grep</command> <literal>cz</literal>
+cz
+cz-cp1250
+cz-lat2
+cz-lat2-prog
+cz-qwerty
+cz-us-qwertz
+sunt5-cz-us
+sunt5-us-cz
+
+      </screen>
+      </example>
+    </section>
+    <section id="s2-Setting_the_Keymap">
+     <title>Setting the Keymap</title>
+    <para>
+   	 To set the default keyboard layout for your system, use the following command as <systemitem class="username">root</systemitem>:
+    </para>
+    	<synopsis><command>localectl</command> <option>set-keymap</option> <replaceable>map</replaceable></synopsis>
+    <para>
+    	Replace <replaceable>map</replaceable> with the name of the keymap taken from the output of the <command>localectl</command> <option>list-keymaps</option> command. Unless the <option>--no-convert</option> option is passed, the selected setting is also applied to the default keyboard mapping of the X11 window system, after converting it to the closest matching X11 keyboard mapping. This also applies in reverse, you can specify both keymaps with the following command as <systemitem class="username">root</systemitem>:
+    </para>
+    	<synopsis><command>localectl</command> <option>set-x11-keymap</option> <replaceable>map</replaceable></synopsis>
+    <para>
+    	If you want your X11 layout to differ from the console layout, use the <option>--no-convert</option> option.
+    </para>
+       <synopsis><command>localectl</command> <option>--no-convert</option> <option>set-x11-keymap</option> <replaceable>map</replaceable></synopsis>
+     <para>
+     	With this option, the X11 keymap is specified without changing the previous console layout setting.
+     </para>
+     <example>
+       <title>Setting the X11 Keymap Separately</title>
+       <para>
+     	Imagine you want to use German keyboard layout in the graphical interface, but for console operations you want to retain the US keymap. To do so, type as <systemitem class="username">root</systemitem>:
+     </para>
+      <synopsis>~]#&nbsp;<command>localectl</command> <option>--no-convert</option> <option>set-x11-keymap</option> <replaceable>de</replaceable></synopsis>
+      <para>
+     	Then you can verify if your setting was successful by checking the current status: 
+     </para>
+     <screen>
+~]$&nbsp;<command>localectl</command> <option>status</option>
+   System Locale: LANG=de_DE.UTF-8
+       VC Keymap: us
+      X11 Layout: de
+     </screen>
+     </example>
+     <para>
+     	Apart from keyboard layout (<replaceable>map</replaceable>), three other options can be specified:
+  	</para>
+      <synopsis><command>localectl</command> <option>set-x11-keymap</option> <replaceable>map</replaceable> <replaceable>model</replaceable> <replaceable>variant</replaceable> <replaceable>options</replaceable></synopsis>
+      <para>
+      		Replace <replaceable>model</replaceable> with the keyboard model name,
+      		<replaceable>variant</replaceable> and <replaceable>options</replaceable> with keyboard variant and option components, which can be used to enhance the keyboard behavior. These options are not set by default. For more information on X11 Model, X11 Variant, and X11 Options see the <systemitem>kbd(4)</systemitem> man page.
+      </para>
+      </section>
+  </section>
+  <section id="sect-Keyboard_Configuration-Resources">
+    <title>Additional Resources</title>
+    <para>
+      For more information on how to configure the keyboard layout on Red Hat Enterprise Linux, see the resources listed below:
+    </para>
+    <bridgehead id="brid-Keyboard_Configuration-Resources-Installed">Installed Documentation</bridgehead>
+    <itemizedlist>
+      <listitem>
+        <para>
+          <systemitem>localectl</systemitem>(1) — The manual page for the <command>localectl</command> command line utility documents how to use this tool to configure the system locale and keyboard layout.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <systemitem>loadkeys</systemitem>(1) — The manual page for the <command>loadkeys</command> command provides more information on how to use this tool to change the keyboard layout in a virtual console.
+        </para>
+      </listitem>
+    </itemizedlist>
+    <!--<bridgehead id="brid-Keyboard_Configuration-Resources-Also">See Also</bridgehead>
+    <itemizedlist>
+      <listitem>
+        <para>
+          <xref linkend="chap-Gaining_Privileges" /> documents how to gain administrative privileges by using the <command>su</command> and <command>sudo</command> commands.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <xref linkend="chap-Managing_Services_with_systemd" /> provides more information on <systemitem class="daemon">systemd</systemitem> and documents how to use the <command>systemctl</command> command to manage system services.
+        </para>
+      </listitem>
+    </itemizedlist>-->
+  </section>
+</chapter>


More information about the docs-commits mailing list