diff --git a/chapter06/kbd-exp.xml b/chapter06/kbd-exp.xml index e00d4b751..f084752bf 100644 --- a/chapter06/kbd-exp.xml +++ b/chapter06/kbd-exp.xml @@ -8,11 +8,8 @@ the FHS suggests. rm /usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz: We remove this file because we don't know which keymap you -need to use. - -ln -s <path-to-keymap> defkeymap.map.gz -With this command you set the default keymap that can be loaded using -the loadkeys -d command. +need to use. As said above, we will be defining the default keymap in +chapter 7 when the system configuration files are created. diff --git a/chapter06/kbd-inst.xml b/chapter06/kbd-inst.xml index 1733fb310..3529768c7 100644 --- a/chapter06/kbd-inst.xml +++ b/chapter06/kbd-inst.xml @@ -8,17 +8,8 @@ make install && rm /usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz -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: - -cd /usr/share/kbd/keymaps && -ln -s <path-to-keymap> defkeymap.map.gz - -Replace <path-to-keymap> 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. +We will be defining our default keymap later on when we create the +system configuration files in chapter 7. diff --git a/chapter07/loadkeys.xml b/chapter07/loadkeys.xml index 07d003538..a9ed74dae 100644 --- a/chapter07/loadkeys.xml +++ b/chapter07/loadkeys.xml @@ -1,10 +1,16 @@ Creating the loadkeys script + + +Create the /etc/init.d/loadkeys script by +running the following command: cat > loadkeys << "EOF" #!/bin/sh @@ -16,16 +22,44 @@ following command: 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 EOF + +Creating the /etc/sysconfig/keyboard file + +Create a new file /etc/sysconfig/keyboard +by running the following: + +cat > /etc/sysconfig/keyboard << "EOF" +# Begin /etc/sysconfig/keyboard + +LAYOUT=<path-to-keymap> + +# End /etc/sysconfig/keyboard +EOF + +Replace <path-to-keymap> with the +path to the keymap you have selected. For example, if you have chosen the +US keymap, you would replace it with +/usr/share/kbd/keymaps/i386/qwerty/us.map.gz. + + +