-   Slackware (
-   -   keyboard layout changes during boot (

funkyslacker 09-30-2012 06:50 AM

keyboard layout changes during boot

I have installed slackware 2 days ago and I'm impressed. It's a lot of work, but I like it to configure my linux.

I've encrypted my home folder/partition and swap space with cryptsetup.
Every time during the boot process I have to enter the password. That's not the problem, but the keyboard layout is US, but during the installation i set it to german-latin1.

This is the content of my /etc/rc.d/rc.keymap

# Load the keyboard map.  More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then

when boot process ended and I have to enter my username and password (at the console/getty), the keymap changed to the correct german settings.

I installed the login manager SLiM (great manager). If I change the runlevel to 4 and linux starts slim the keymap is US. After the login it changes to german.

I'm very confused and I don't know how to change it. Can you give me some hints ?

Didier Spaier 09-30-2012 08:05 AM

Hi Funkysmlacker,

Welcome to LQ and to the Slakware forum.

Just do this as root:

cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d
Then in /etc/X11/xorg.conf.d/90-keyboard-layout.conf replace the line:

        Option "XkbLayout" "us"

        Option "XkbLayout" "de"
Then (re) start X.

Rationale: there are two distinct settings for the keyboard layout: one on the console and one under X.

You could have to do this setting in your DE as well, depending on which one you use.

hotchili 09-30-2012 08:26 AM

With encryption you are probably booting from an initrd, you can set a keymap for the initrd.
So keyboard is already in native language when you type your luks password :)


# mkinitrd --help
Usage: mkinitrd [OPTION]


  -l      Custom keymap to load. Like, 'nl' or 'de-latin1-nodeadkeys'


funkyslacker 09-30-2012 09:33 AM

thank you, this solved the problem with the wrong keymap at SLiM.

thanx for the tip. You're right I'm booting from an initrd and the keymap is still "us" when I enter my luks password.
I've never set up an initrd. Do I have to change somthing in /boot ?

All times are GMT -5. The time now is 09:50 AM.