LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   keyboard layout changes during boot (http://www.linuxquestions.org/questions/slackware-14/keyboard-layout-changes-during-boot-4175429714/)

funkyslacker 09-30-2012 05:50 AM

keyboard layout changes during boot
 
Hi,

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
Code:

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

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 07:05 AM

Hi Funkysmlacker,

Welcome to LQ and to the Slakware forum.

Just do this as root:
Code:

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:
Code:

        Option "XkbLayout" "us"
with
Code:

        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 07: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 :)

Code:

# mkinitrd --help
Usage: mkinitrd [OPTION]

[...]

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

[...]


funkyslacker 09-30-2012 08:33 AM

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

@hotchili
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 01:52 AM.