-   Linux - Desktop (
-   -   Multiple X displays and keymap problem (

coralfang 09-20-2011 03:06 PM

Multiple X displays and keymap problem
Hello. For a while now i have wondered why this happens...

I heard that running a fullscreen application in its own display tends to increase frames per second (games for example) as the desktop environment is backgrounded, so i created a tiny script to launch the sauerbraten first-person-shooter like this:



xinit /usr/bin/sauerbraten-client $* -- :1

This works nicely, the game starts on a new display (ctrl+alt+f8) and i do see the speed improvement, however my keymap changes (or rather, falls back) to the american layout.

My system is set to use british english layout. Which is [gb] in X, and called [uk] within ArchLinux system settings.

This is on ArchLinux, /etc/rc.conf contains these:


Everything such as KDE, gettys, all default to the gb layout. Obviously not when launching a seperate xorg display.

How can i force X to use a specific keymap, or make it default to gb/uk english when starting a new display? I have tried adding lines into the script before `xinit' such as `setxkbmap gb &'... but nothing happens.


coralfang 09-20-2011 03:26 PM

[Solved] Multiple X displays and keymap problem
Nevermind, i found a way:


Section "InputClass"
    Identifier            "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option                "XkbLayout" "gb"

It works!

All times are GMT -5. The time now is 08:12 PM.