Solved How to change the gdm greeter keyboard layout ?

Sebel

New Member

Thanks: 3
Messages: 19

#1
Hi !

I've been searching for hours but I can't find a solution to something which seems easy...

My gnome system settings are changed to my local ones, the keyboard layout is OK when logged in but not before.

On the logging screen I can only use the US keyboard layout. How can I change this ?

I found something on Google, which consists of modifying the /usr/local/etc/gdm/Init/Default and adding "setxkbmap be" just before the exit call, but it doesn't work neither.

Thanks for you help (because my passwords have specials chars ;-)).

Sebel
 

chrbr

Aspiring Daemon

Thanks: 229
Messages: 634

#2
You can specify a keymap in /etc/rc.conf by something as
Code:
keymap="de"
or so. I do now know if this has an effect on x11/gdm, but it should be worth to try.
 
OP
OP
S

Sebel

New Member

Thanks: 3
Messages: 19

#3
Hi chrbr !

Thanks for you reply.

This configuration has been done at the first installation of FreeBSD, even before the installation of Xorg and Gnome. I've got the right keyboard layout everywhere (including all ttys) except on the Gnome login screen.

One thing I also tried yesterday is modifying /usr/local/etc/gdm/locale.conf but this has no effect at all...
 
OP
OP
S

Sebel

New Member

Thanks: 3
Messages: 19

#5
Ok so it seems to be an Xorg problem.

I've read the section you mentioned (which is not present in the French translated handbook).

I've added this to my /etc/X11/xorg.conf :
Code:
Section    "InputClass"
    Identifier    "KeyboardDefaults"
    Driver        "keyboard"
    MatchIsKeyboard    "on"
    Option        "XkbLayout" "be"
EndSection
but when I do this I have no more keyboard at all.

The driver used by my Xorg configuration is "kbd" not "keyboard". Can this cause my problem ?
Code:
Section "InputDevice"
   Identifier   "Keyboard0"
   Driver       "kbd"
EndSection
I then modified Xorg configuration file like this :
Code:
Section "InputClass"
   Identifier    "Keyboards"
   Driver        "kbd"
   MatchIsKeyboard   "True"
   Option    "XkbLayout" "be"
EndSection
The keyboard works but still in US layout...
 
OP
OP
S

Sebel

New Member

Thanks: 3
Messages: 19

#6
The Xorg log file indicates that the KB layout be is loaded.

Code:
[    88.584] (**) kbdmux: Applying InputClass "Keyboard-be"
[    88.584] (II) LoadModule: "kbd"
[    88.618] (II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
[    88.621] (II) Module kbd: vendor="X.Org Foundation"
[    88.621]     compiled for 1.18.4, module version = 1.9.0
[    88.621]     Module class: X.Org XInput Driver
[    88.621]     ABI class: X.Org XInput driver, version 22.1
[    88.621] (II) Using input driver 'kbd' for 'kbdmux'
[    88.621] (**) kbdmux: always reports core events
[    88.621] (**) kbdmux: always reports core events
[    88.621] (**) Option "Protocol" "standard"
[    88.621] (**) Option "XkbRules" "base"
[    88.621] (**) Option "XkbModel" "pc105"
[    88.621] (**) Option "XkbLayout" "be"
[    88.621] (**) Option "config_info" "devd:kbdmux"
[    88.621] (II) XINPUT: Adding extended input device "kbdmux" (type: KEYBOARD, id 6)
[    88.654] (II) config/devd: kbdmux is enabled, ignoring device atkbd0
But the keyboard is still in US layout when logging in... o_O
 

lasuit

New Member

Thanks: 2
Messages: 11

#7
I would try
Code:
set | grep "GDM_LANG"
. If it's not the appropriate "be" configuration, you'll probably have to set the $LANG
 
OP
OP
S

Sebel

New Member

Thanks: 3
Messages: 19

#8
set didn't return any result for that variable, but with setenv | grep GDM_LANG I've got fr_FR.UTF-8.

That's not the right value but it's not "US" either...

I've set the value of LANG to fr_BE.UTF-8 in /usr/local/etc/gdm/locale.conf, this has an effect on my Gnome sessions (right language, right kb layout) but not on logging screen.
 
OP
OP
S

Sebel

New Member

Thanks: 3
Messages: 19

#9
Ok while waiting an answer I tried some things.

1. On the problematic laptop I reinstalled FreeBSD from scratch. The shell keyboard layout is OK. I then installed Xorg and configured it. When I started X with startx, the keyboard layout was also OK i a XTerm. I then installed Gnome3 but still the same problem : US keyboard layout when typing my password in the logging screen.

2. I did the same operations on an other laptop, the result is exactly the same issue.

Does anyone else encouter this issue even with other layouts ?

Thanks
 
OP
OP
S

Sebel

New Member

Thanks: 3
Messages: 19

#10
Still no answer to this issue but I'm going ahead on my side.

I've tried other display managers such as x11/xdm and x11/kde4, both of them are working fine. Nothing special to do to get the right keyboard layout (except X basic configuration of course).

If no solution can be found I think I will continue on x11/kde4, that's too bad for Gnome...
 

Adrien2002

Member

Thanks: 2
Messages: 39

#12
Salut Sebel,

I'm having the exact same problem with you. I installed a FreeBSD in a VBox guest, everything is ok until I start X.

Well I didn't set it through Gnome because I want to find the solution and set it with X.org instead so it'll apply everywhere.

So the same as you but with my french keyboard :(

olivierd: That directory is empty in my virtual machine.
 

Adrien2002

Member

Thanks: 2
Messages: 39

#13
Ok I'm coming back because I may have found something interesting.

I set my xorg.conf like this :

Code:
Section "InputClass"
Identifier "Clavier FR"
Option "XkbLayout" "fr"
EndSection
When I try to run Gnome3, my keyboard is still in en_US even the Xorg.log tells me my keyboard is pc105, fr_FR, etc...

So I decided to give a try with a simpler graphical interface using i3 instead of Gnome3 and my keyboard is in french in i3 thanks to my xorg.conf. So the problem is that Gnome3 is doing too much things on the locale of the keyboard but I don't really know how to avoid that or to force Gnome3 to use the X.org configuration file...
 
OP
OP
S

Sebel

New Member

Thanks: 3
Messages: 19

#14
Hi again and sorry for the delay as I haven't been notified of your answers till now !

I'm now using x11/xdm to log into my Gnome Desktop and this works great. No idea how to make x11/gdm working with my belgian keyboard.

Thanks for all your replies !

Sebel
 
Top