HAL french keyboard

Hi all,

I have an issue to set my keyboard layout in French with X (out of X everything is fine since iI've chosen my layout during installation).

iI have configured .xinitrc, xorg.conf, .login.conf and x11-input.fdi - as described in the handbook - without success :

Code:
# cat /usr/local/etc/hal/fdi/policy/x11-input.fdi
<?xml version="1.0" encoding="iso-8859-1"?>
<deviceinfo version="0.2">
  <device>
  <match key="info.capabilities" contains="input.keyboard">
  <merge key="input.x11_options.XkbModel" type="string">pc105</merge>
  <merge key="input.x11_options.XkbLayout" type="string">fr</merge>
  </match>
  </device>
</deviceinfo>

Code:
# cat .xinitrc
export LANG="fr_FR.ISO8859-1"
export LC_ALL="fr_FR.ISO8859-1"
export LC_MESSAGES="fr_FR.ISO8859-1"
exec mate-session

Code:
# cat .login_conf
me:\
:charset=ISO-8859-1:\
:lang=fr_FR.ISO8859-1:

xorg.conf (relevant section):

Code:
Section "InputDevice"
  Identifier  "Keyboard0"
  Driver  "kbd"
  Option "XkbLayout" "fr"
  Option "XkbModel" "pc105"
  Option "XkbVariant" "pc105"
  Option "XkbOptions" "grp:rctrl_toggle,grp_led:scroll"
EndSection

In Xorg logs, iI see Xorg enabling my keyboard, but a few lines later :

Code:
[  14.873] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  14.873] (WW) Disabling Mouse0
[  14.873] (WW) Disabling Keyboard0

OK, since I'm using the kbd driver, HAL is disabling keyboard0, but my layout is not configured as described in my x11-input.fdi (I don't want to disable hotplug, if possible).

By the way, it is *probably* the same issue described in this thread (marked as solved):

https://forums.freebsd.org/threads/hal-swiss-french-keyboard.50041/

P.S : iI hope that is the good section to post this.

Thanks for answering ! =)
 
Have you tried to put this line in your .xinitrc ?
Code:
setxkbmap fr

---- Edit ----

I do not use Mate so there is maybe a dedicated setting for what you are trying to achieve.
 
Yes iI have tested it too and it does not works (when iI execute this command in root shell the layout is changed, but iI have to login with us layout and setxkbmap fr after every re/boot).

iI was thinking this setup was wrong since iI have not see it in documentation.
here is my current .xinitrc:

Code:
export LANG="fr_FR.ISO8859-1"
export LC_ALL="fr_FR.ISO8859-1"
export LC_MESSAGES="fr_FR.ISO8859-1"
exec mate-session
setxkbmap fr
 
Adding exec does not change anything. I have not search threads related to MATE cause when starting X (with startx command) alone, the issue persists, but iI'll give it a try and came back.
 
adding exec does not change anything

I am not sure about what you mean here. Did you try with the following .xinitrc file and it did not work ?
Code:
export LANG="fr_FR.ISO8859-1"
export LC_ALL="fr_FR.ISO8859-1"
export LC_MESSAGES="fr_FR.ISO8859-1"
setxkbmap fr
exec mate-session
 
From Thread mate-desktop-forgets-or-does-not-store-permanently-the-desired-keyboard-layout-howto.53222 i have done the first part :

1. In System-Preferences-Keyboard-Layouts, delete the English Layout and add the desired Language!

But for the second part:

2. Press ALT+F2 and insert "ibus-setup" into the "Run Application" Window, then
move to "Input Method" and delete the English Keyboard-Layout, and:
Add -> Your Favorite Language! Then REBOOT!

Inserting "ibus-setup" give me the following error : Impossible d'ouvrir l'emplacement « file:///home/#USERNAME/ibus-setup »
I can translate this with : Impossible to open location « file:///home/#USERNAME/ibus-setup »

After a reboot:
  • During login (with slim), keyboard is in us layout (the issue persist)
  • In MATE, keyboard is in french (so no need to setxkbmap fr from now =))
At this point: oh ! you're right, I have modified my .xinitrc in the wrong way (sorry I have misunderstand you !).

So, I modify my .xinitrc...

Code:
$ cat .xinitrc
export LANG="fr_FR.ISO8859-1"
export LC_ALL="fr_FR.ISO8859-1"
export LC_MESSAGES="fr_FR.ISO8859-1"
setxkbmap fr
exec mate-session

...and I reboot : same behaviour, login (slim) in us and MATE in fr.

I display the current layout (I have not tested this command before):

Code:
$ setxkbmap -print | grep xkb_symbols
   xkb_symbols  { include "pc+fr+inet(pc105)"   };

It seems to be good, but the login part remains problematic.

-- edit --

It's seems you're right from the beginning, MATE was overriding my settings, after configuring it, it is OK. So the real problem (if a real problem exist) is slim.
 
Well, this is not the best solution but the following might work for you until you get a better answer. In the Section "ServerLayout" of your xorg.conf add the following line.
Code:
Option "AutoAddDevices" "Off"
Then, if you are using Slim to login, you might want to modify your .xinitrc that way.
Code:
export LANG="fr_FR.ISO8859-1"
export LC_ALL="fr_FR.ISO8859-1"
export LC_MESSAGES="fr_FR.ISO8859-1"
setxkbmap fr
exec $1
So you can choose your windows manager from Slim.
 
Yes disable hotplug can be a workaround (I have seen this).

Thanks, I have modified my .xinitrc following your advice.

I have test to add this line in /usr/local/etc/slim.conf as described here https://bbs.archlinux.org/viewtopic.php?pid=756340#p756340

Code:
xserver_arguments -layout fr

But after that X is not working anymore.

From the same thread : https://bbs.archlinux.org/viewtopic.php?pid=780185#p780185

Do you think that modifying my xorg.conf like this can be an option ?

Code:
Section "InputDevice"
Identifier "Keyboard0"
Driver "devd"
Option "XkbLayout" "fr"
Option "XkbModel" "pc105"
Option "XkbVariant" "pc105"
Option "XkbOptions" "grp:rctrl_toggle,grp_led:scroll"
EndSection

I am scared to loose keyboard input (since the driver is not "kbd", HAL will not disable it, so if this setting is not correct it will break keyboard input ?) , so I prefer to ask you first, does it seems to be a good idea (or absolutely not)?
 
Back
Top