Page 1 of 2

How to set default keyboard layout for X

Posted: 23. Sep 2010, 07:37
by PelleB
How, or rather where do I set the default keyboard layout for X? I chose Swedish latin1 during setup, which it also is for the system, but when X starts it uses US as default. Changing keyboard layout in Xfce is not a problem, but I would like to have Swedish what ever window manager I am in the mood for using.

Re: How to set default keyboard layout for X

Posted: 23. Sep 2010, 08:15
by thenktor
Perhaps a bug in keyboardsetup. You can read this: http://www.salixos.org/forum/viewtopic. ... ard+layout
There is also a solution posted in the first posts.

What is the content of /etc/rc.d/rc.keymap?

What do you have in /etc/hal/fdi/policy/10-keymap.fdi in this section:

Code: Select all

      <!-- Edit (as needed) these four lines in the copied fdi file -->
      <merge key="input.xkb.rules" type="string">base</merge>
      <merge key="input.xkb.model" type="string">evdev</merge>
      <merge key="input.xkb.layout" type="string">de</merge>
      <merge key="input.xkb.variant" type="string"></merge>

Re: How to set default keyboard layout for X

Posted: 23. Sep 2010, 08:17
by damNageHack
You can find a very good documentation for xorg.conf in the archlinux forum.

http://wiki.archlinux.org/index.php/Xor ... d_settings

Re: How to set default keyboard layout for X

Posted: 23. Sep 2010, 10:38
by Akuna
Question: did you install Salix from SalixLive or from the regular Salix iso ncurse installer? Also, are you using LXDE or XFCE edition?

Tx

Re: How to set default keyboard layout for X

Posted: 23. Sep 2010, 14:34
by PelleB
The installation was made from the regular CD, Xfce-edition.

Contents of rc.keymap

Code: Select all

#!/bin/sh
# Load the keyboard map.  More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then
 /usr/bin/loadkeys -u se-latin1.map
fi
I do not have a /etc/hal/fdi/policy/10-keymap.fdi

There is a xorg.conf-vesa in /etc/X11 but changing it does not change anything. I did that after reading the the thraed about Swiss keyboards.

In the console I have Swedish keyboard, no problem there.

Re: How to set default keyboard layout for X

Posted: 23. Sep 2010, 14:51
by gapan
PelleB wrote:I do not have a /etc/hal/fdi/policy/10-keymap.fdi
Did you install salix in CORE mode?

Anyway, launch the "keyboard" tool from the System menu and select your keymap.

Re: How to set default keyboard layout for X

Posted: 23. Sep 2010, 15:06
by PelleB
I installed it in the FULL mode, I have installed it on four different computers, the result is the same. When XFCE starts, it is with US keyboard. The keyboard setup in XFCE calls it "system default". Changing the options with XFCE keyboard setup works, the keyboardswitcher works, but if I start Fluxbox in stead, there is the US layout again.

Switching keyboard layouts in Fluxbox also works, at least to German or Swedish, Polish did not work, but I may have typed something wrong there.

Re: How to set default keyboard layout for X

Posted: 23. Sep 2010, 17:06
by gapan
You're mentioning se-latin1 in your rc.keymap, but I believe the right swedish keymap is sv-latin1. Can you try that from the keyboard tool in the System menu?

Re: How to set default keyboard layout for X

Posted: 23. Sep 2010, 17:32
by PelleB
You're mentioning se-latin1 in your rc.keymap, but I believe the right swedish keymap is sv-latin1. Can you try that from the keyboard tool in the System menu?
That was the problem. I got the 10-keymap.fdi now too.

But what is se-latin1 then? Which language? And how come, that I had the correct layout in the command line all the time?

Re: How to set default keyboard layout for X

Posted: 23. Sep 2010, 17:41
by gapan
PelleB wrote:But what is se-latin1 then? Which language? And how come, that I had the correct layout in the command line all the time?
To be honest, I'm not sure. It might still be another type of swedish keymap. I can only remember one other swedish user telling me that the correct one is sv-latin1 some time ago.