[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: XKB problem with x-terminal



(okay, took me while to reply, but just in case you haven't figured it
out yourself in the meantime...)

On Wed, Dec 07, 2005 at 02:16:09PM +0200, Simo Kauppi wrote:
> Hi,
> 
> Is there a way to compile keyboard definitions for X and save them
> somewhere, where XServer can read them, when it starts?
> 
> The reason I'm asking is that I set up a thinclient, i.e. an x-terminal
> with just Xorg running on it. When X starts it gives the '(EE) Couldn't
> load XKB keymap, falling back to pre-XKB keymap' -error and the keyboard
> doesn't work properly.
> 
> It seems that when X starts it wants to compile the keyboard stuff on
> the fly and feed it to the $DISPLAY.
> 
> The problem is that the xkb/rules are in the xlibs, which pulls all of
> the xlibraries with it. To make things worse the, xkbcomp is in the
> xbase-clients.
> 
> So, to be able to run x-terminal I would have to install all the
> xlibraries and all the xclients into my terminal. For me this doesn't
> seem very rational.

The easiest way to create a compiled keymap is probably to extract
it from a running X server (on a machine which has xbase-clients
installed, and is running the desired xkb setup):

$ xkbcomp -xkm :0 keymap.xkm

Then, simply transfer the resulting keymap.xkm to your thinclient,
where you can make the X server load it upon startup using the option
"-xkbmap keymap.xkm".

Another way would be to generate a specific keymap configuration from
options like you have in Xorg.conf.  For example, I have in my section
"InputDevice"
    ...
    Option      "XkbRules"  "xfree86"
    Option      "XkbModel"  "pc105"
    Option      "XkbLayout" "de"
    ...

This would translate into the following commandline:

$ setxkbmap -rules xfree86 -model pc105 -layout de -print | xkbcomp -xkm -w 3 - keymap.xkm

The part before the pipe generates an "xkb config file", like this

xkb_keymap {
        xkb_keycodes  { include "xfree86+aliases(qwertz)"       };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc/pc(pc105)+pc/de"    };
        xkb_geometry  { include "pc(pc105)"     };
};

which essentially contains parameterized include statements for
individual xkb files, according to what has been determined via the
rules.  This is then fed into xkbcomp to be compiled into keymap.xkm
(the -w 3 is just to reduce the warnings to a sensible level...).

Cheers,
Almut



Reply to: