From: Tuxedo on
I use Slackware 12.2 since recently and all is working well. The
installation was done with English as default language but with a German
keyboard. After booting and logging in as root or as a user the keymap is
correct for the German keyboard, However, if logging into a non-KDE window
manager the system appears to expect a different keyboard.

I've now set the system to boot at runlevel 4 automatically and so the
log-in manager (KDM or GDM?) appears first. Initially, this appeared to be
in Afrikaans. It's no problem to reset it to English or German but that is
only the display language of the log-in options etc., not the keymap input
which I think is now in US English (or perhaps Afrikaans).

I think "de" keyboard layout needs to be defined in some system file taking
effect at an earlier stage of the start up procedure. Of course, I can
still log in by pretending I have a US keyboard but can someone advise me
where the relevant setting can be configured for the system to be German
keyboard aware at start up, so it also takes effect for the log-in manager?

Many thanks,
Tuxedo
From: Martin Schmitz on
Tuxedo wrote:
> I use Slackware 12.2 since recently and all is working well. The
> installation was done with English as default language but with a
> German keyboard. After booting and logging in as root or as a user the
> keymap is correct for the German keyboard, However, if logging into a
> non-KDE window manager the system appears to expect a different
> keyboard.

copy /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi to
/etc/hal/fdi/policy/10-keymap.fdi and edit it according to your needs.

Martin

From: Tuxedo on
Martin Schmitz wrote:

[...]

> /etc/hal/fdi/policy/10-keymap.fdi

Thanks, I tested by copying the file into the above location with the end
part of the XML changed from "us" to "de":
<merge key="input.xkb.layout" type="string">de</merge>

However, after rebooting, there is no difference from earlier in that the
log-in manager still thinks there should be a US keyboard present and so
does at least one of the non-KDE window managers. The KDE window manager
also assumed a US keyboard at the first session right after install, but
that is always easy to reset in the Control Centre for any future sessions.

Could perhaps command load loadkeys (as in loadkeys=de?) be run at some
start up level? Or is this value perhaps set in some other config file?

The current set up does not recognise the German keyboard right from the
start, beginning with the log-in manager.

Thanks for any tips,
Tuxedo

The complete 10-keymap.fdi file:

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keymap">
<append key="info.callouts.add"
type="strlist">hal-setup-keymap</append>
</match>

<match key="info.capabilities" contains="input.keys">
<merge key="input.xkb.rules" type="string">base</merge>

<!-- If we're using Linux, we use evdev by default (falling back to
keyboard otherwise). -->
<merge key="input.xkb.model" type="string">keyboard</merge>
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
string="Linux">
<merge key="input.xkb.model" type="string">evdev</merge>
</match>

<merge key="input.xkb.layout" type="string">de</merge>
<merge key="input.xkb.variant" type="string" />
</match>
</device>
</deviceinfo>

From: Martin Schmitz on
Tuxedo wrote:
> Martin Schmitz wrote:
>> /etc/hal/fdi/policy/10-keymap.fdi
>
> Thanks, I tested by copying the file into the above location with the
> end part of the XML changed from "us" to "de":
> <merge key="input.xkb.layout" type="string">de</merge>
>
> However, after rebooting, there is no difference from earlier in that
> the log-in manager still thinks there should be a US keyboard present

XML is like HTML: everything between <!-- and --> is a comment. You did
your change in the comment part of the file. Do it above.

Martin

From: Tuxedo on
Martin Schmitz wrote:

[...]

> XML is like HTML: everything between <!-- and --> is a comment. You did
> your change in the comment part of the file. Do it above.

Thanks for the info, but the code was not within a comment but outside or
below any comments above. There were two comment tags in the file and they
contained only comments, not code.

I guess the log-in manager is also part of the X-environment, so I added the
following in the "InputDevice" section of xorg.conf:

Option "XkbLayout" "de"

In my xorg.conf there are some pre-commented InputDevice settings that are
the defaults of my particular installation in case nothing else is defined,
which there wasn't. Here the "us" keyboard was one of my default settings:

# These are the default XKB settings for X.Org
#
# Option "XkbRules" "xorg"
# Option "XkbModel" "pc105"
# Option "XkbLayout" "us"
# Option "XkbVariant" ""
# Option "XkbOptions" ""

I'm not sure if settings in the "10-keymap.fdi" xml takes precedence of the
defaults or specified settings in xorg.conf? In any case, the keyboard is
now working correctly at the log-in manager level without the 10-keymap.fdi
file in place, as well as within any window manager sessions thereafter.

Thanks,
Tuxedo