mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-19 13:37:39 +00:00
Bug 43 and 47: keymap fix
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@906 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
bd8f55ac2d
commit
2ea6929754
@ -8,11 +8,8 @@ the FHS suggests.</para>
|
||||
<para><userinput>rm
|
||||
/usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz:</userinput> We
|
||||
remove this file because we don't know which keymap you
|
||||
need to use.</para>
|
||||
|
||||
<para><userinput>ln -s <path-to-keymap> defkeymap.map.gz</userinput>
|
||||
With this command you set the default keymap that can be loaded using
|
||||
the <userinput>loadkeys -d</userinput> command.</para>
|
||||
need to use. As said above, we will be defining the default keymap in
|
||||
chapter 7 when the system configuration files are created.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -8,17 +8,8 @@
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>rm /usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz</userinput></screen></para>
|
||||
|
||||
<para>Now we have to choose a default keymap. Explore the
|
||||
/usr/share/kbd/keymaps directory, and find the keymap that you would like to use
|
||||
as a default. Then execute this command:</para>
|
||||
|
||||
<para><screen><userinput>cd /usr/share/kbd/keymaps &&</userinput>
|
||||
<userinput>ln -s <path-to-keymap> defkeymap.map.gz</userinput></screen></para>
|
||||
|
||||
<para>Replace <userinput><path-to-keymap></userinput> with the path to the
|
||||
keymap you have selected, relative to the /usr/share/kbd/keymaps/ directory. For
|
||||
example, if you have chosen the US keymap, you would replace it with
|
||||
i386/qwerty/us.map.gz.</para>
|
||||
<para>We will be defining our default keymap later on when we create the
|
||||
system configuration files in chapter 7.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -1,10 +1,16 @@
|
||||
<sect1 id="ch07-loadkeys">
|
||||
<title>Creating the loadkeys script</title>
|
||||
|
||||
<!--
|
||||
<para>You only need to create this script if you don't have a
|
||||
default 101 keys US keyboard layout. Create the
|
||||
<filename>/etc/init.d/loadkeys</filename> script by running the
|
||||
following command:</para>
|
||||
default 101 keys US keyboard layout.
|
||||
|
||||
Because we've scrapped the symbolic link for the default, I assume
|
||||
that everyone will need this script?
|
||||
-->
|
||||
|
||||
<para>Create the <filename>/etc/init.d/loadkeys</filename> script by
|
||||
running the following command:</para>
|
||||
|
||||
<para><screen><userinput>cat > loadkeys << "EOF"</userinput>
|
||||
#!/bin/sh
|
||||
@ -16,16 +22,44 @@ following command:</para>
|
||||
|
||||
source /etc/init.d/functions
|
||||
|
||||
#
|
||||
# Include /etc/sysconfig/keyboard which contains the LAYOUT variable
|
||||
#
|
||||
|
||||
source /etc/sysconfig/keyboard
|
||||
|
||||
#
|
||||
# Load the default keymap file
|
||||
#
|
||||
|
||||
echo -n "Loading keymap..."
|
||||
/bin/loadkeys -d 2>/dev/null
|
||||
/bin/loadkeys $LAYOUT 2>/dev/null
|
||||
evaluate_retval
|
||||
|
||||
# End /etc/init.d/loadkeys
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
|
||||
<sect2>
|
||||
<title>Creating the /etc/sysconfig/keyboard file</title>
|
||||
|
||||
<para>Create a new file <filename>/etc/sysconfig/keyboard</filename>
|
||||
by running the following:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/sysconfig/keyboard << "EOF"</userinput
|
||||
>
|
||||
# Begin /etc/sysconfig/keyboard
|
||||
|
||||
LAYOUT=<path-to-keymap>
|
||||
|
||||
# End /etc/sysconfig/keyboard
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
|
||||
<para>Replace <userinput><path-to-keymap></userinput> with the
|
||||
path to the keymap you have selected. For example, if you have chosen the
|
||||
US keymap, you would replace it with
|
||||
<userinput>/usr/share/kbd/keymaps/i386/qwerty/us.map.gz.</userinput></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user