setxkbmap program and rule files

Aleksej Struk astruk at gmail.com
Wed May 17 14:28:53 PDT 2006


Hi all,

I have to following issue to disscuss. Currently I'm working on a module
for the Enlightenmet WM. For this module I need functionality that would
be able to switch between X keyboard models-layouts-varians. In order to
write such a functionality, I took a setxkbmap program from the X package
as an example.

The main thing, that I noticed, when I compiled it on my own, that it does
not work, and fail to set model-layout-variant. It reported me and error,
that it cannot find a rules file "xorg". However, this was not the main
problem. After adjusting the source a little bit by directly pointing
a rules file (/usr/lib/X11/xkb/rules/xorg) this error disappeared. This
path is taken from the setxkbmap's man page.

Second, after my modifications, I've got following error :

Error Loading new keyboard desctiption

with the following command : ./setxkbmap -model compaqik13 -layout us
-variant basic


Since this behavior was mistirious for me, I tried to run it with the
high verbosity level :

./setxkbmap -verbose 10 -model compaqik13 -layout us -variant basic

The output was the following :

Setting verbose level to 10
locale is C
Warning! Multiple definitions of keyboard model
         Using command line, ignoring X server
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Warning! Multiple definitions of layout variant
         Using command line, ignoring X server
Applied rules from xorg:
model:      compaqik13
layout:     us
variant:    basic
Trying to build keymap using the following components:
keycodes:   xfree86+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc/pc(pc105)+pc/us(basic)+inet(compaqik13)
geometry:   pc(pc104)
Error loading new keyboard description

The most mistirious fact for me, that first two atom in symbols (between
+ signs) are prepended with the "pc/". The setxkbmap installed from the
packege do not prepend them with "pc/". So, I started to incestigate
why the package version of the program behaves correctly.

Finaly, I found, that it used rules file via the following path :
/usr/share/X11/xkb/rules

After I modified my version of setxkbmap to use this path, it started
to work correctly.


So, the question is : Is this is an expected behaviour, that two rules
file produces different behaviour of the same program ? From my point
of view, they shoul impact setxkbmap similarly. BTW, the path to the
"incorrect" rule file is given in man page. Therefore, I can conclude,
that this can be a "bug", and those files should be identical.

My system configuration is the following :

OS : Gentoo Linux 2005.0
Xorg version : 7.0 with the lates updates provided by Gentoo portage.

NOTE !!! : please CC me in replies, since I'm not on the list.

Thanks,
Aleksej.

--

Aleksej Struk
Master Degree Student
Free University of Bozen-Bolzano
Faculty of Computer Science
phone: +39-0471-061749
cell phone: +39-3204627049 +370-61278908
astruk at gmail.com alstruk at unibz.it - http://astruk.googlepages.com/home



More information about the xorg mailing list