LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Multiple X displays and keymap problem (http://www.linuxquestions.org/questions/linux-desktop-74/multiple-x-displays-and-keymap-problem-904068/)

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:

Code:

#!/bin/bash

DISPLAY=:1.0
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:
Code:

KEYMAP="uk"
LOCALE="en_GB.UTF-8"

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.

:study:

coralfang 09-20-2011 03:26 PM

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

/etc/X11/xorg.conf.d/keyboard.conf
Code:

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

It works!


All times are GMT -5. The time now is 10:38 PM.