summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-02-09 00:44:18 +0100
committer Eric Hameleers <alien@slackware.com>2016-02-09 00:44:18 +0100
commit9cdbfd7bad759454e81f78006b2fd0649caa1137 (patch)
tree6a3643a6af4f60fb19c38ee2fc75a53563261ffa
parent3098f2b255857aa71f6d2453fb28a0a00a2d8ceb (diff)
downloadliveslak-9cdbfd7bad759454e81f78006b2fd0649caa1137.tar.gz
liveslak-9cdbfd7bad759454e81f78006b2fd0649caa1137.tar.xz
Make X Keyboard configuration work properly.
- fix detection of german (de) keyboard layout to configure Compose Key, - actually use field #6 of the languages file (X Keyboard layout & variant) when generating the grub and syslinux boot configuration files.
-rw-r--r--grub.tpl2
-rwxr-xr-xliveinit12
-rwxr-xr-xmake_slackware_live.sh5
3 files changed, 11 insertions, 8 deletions
diff --git a/grub.tpl b/grub.tpl
index fb6a336..7ab2dba 100644
--- a/grub.tpl
+++ b/grub.tpl
@@ -44,7 +44,7 @@ if loadfont $grubdir/theme/dejavusansmono12.pf2 ; then
fi
menuentry "Start Slackware@DIRSUFFIX@ @SL_VERSION@ @LIVEDE@ Live @VERSION@ ($sl_lang)" --hotkey b {
- linux ($root)/boot/generic load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=$sl_kbd tz=$sl_tz locale=$sl_locale
+ linux ($root)/boot/generic load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=$sl_kbd tz=$sl_tz locale=$sl_locale xkb=$sl_xkb
initrd ($root)/boot/initrd.img
}
diff --git a/liveinit b/liveinit
index 443da4c..68beec6 100755
--- a/liveinit
+++ b/liveinit
@@ -512,12 +512,6 @@ EOT
# You can set just the XkbVariant by adding something like "kbd=ch xkb=,fr"
XKBLAYOUT=$(echo $XKB |cut -d, -f1)
XKBVARIANT=$(echo $XKB |cut -d, -f2)
- if [ "$XKBLAYOUT" = "de" ]; then
- # Germans use the AltGr key, so Scroll Lock will be their Compose Key:
- XKBOPTIONS="compose:sclk"
- else
- XKBOPTIONS="compose:ralt"
- fi
# Ensure that XKBLAYOUT gets a value; XKBVARIANT is allowed to be empty.
if [ -z "$XKBLAYOUT" ]; then
if [ -z "$KEYMAP" ]; then
@@ -530,6 +524,12 @@ EOT
XKBLAYOUT="us"
fi
echo "${MARKER}: Switching live X desktop to '$XKBLAYOUT' keyboard"
+ # Germans use the AltGr key, so Scroll Lock will be their Compose Key:
+ if [ "$XKBLAYOUT" = "de" ]; then
+ XKBOPTIONS="compose:sclk"
+ else
+ XKBOPTIONS="compose:ralt"
+ fi
# If the layout is not 'us' then add 'us' as a secondary nevertheless:
if [ "$XKBLAYOUT" != "us" ]; then
XKBLAYOUT="$XKBLAYOUT,us"
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index f31485e..7ff7196 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -378,7 +378,7 @@ EOL
fi
cat <<EOL >> ${MENUROOTDIR}/lang_${LANCOD}.cfg
kernel /boot/generic
- append initrd=/boot/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=$KBD tz=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f4) locale=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f5)
+ append initrd=/boot/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=$KBD tz=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f4) locale=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f5) xkb=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f6)
EOL
done
@@ -434,13 +434,16 @@ EOL
for LANCOD in $(cat languages |grep -Ev "(^ *#|^$)" |cut -d: -f1) ; do
LANDSC=$(cat languages |grep "^$LANCOD:" |cut -d: -f2)
KBD=$(cat languages |grep "^$LANCOD:" |cut -d: -f3)
+ XKB=$(cat languages |grep "^$LANCOD:" |cut -d: -f6)
LANLOC=$(cat languages |grep "^$LANCOD:" |cut -d: -f5)
# Add this entry to the keyboard selection menu:
cat <<EOL >> ${GRUBDIR}/kbd.cfg
menuentry "${LANDSC}" {
set sl_kbd="$KBD"
+ set sl_xkb="$XKB"
set sl_lang="$LANDSC"
export sl_kbd
+ export sl_xkb
export sl_lang
configfile \$grubdir/grub.cfg
}