You are not logged in.

#1 2017-10-07 09:54:53

Klems
Member
Registered: 2017-10-07
Posts: 4

Change keyboard layout Problem [SOLVED]

Hi !
I've recently installed ArchLinux with gnome as desktop environment to begin with.
I've installed Xterm aswell. Unfortunately I can't manage to change my keyboard layout to swiss-french.

Here are different outputs

[brodard@archlinux ~]$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us,ch
variant:    ,fr
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+ch(fr):2+inet(evdev)
geometry:   pc(pc105)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+ch(fr):2+inet(evdev)"    };
        xkb_geometry  { include "pc(pc105)"     };
};

It seems like us keyboard is overwriting the swiss-french keyboard layout.

I tried to solve it using localectl

[brodard@archlinux ~]$ localectl set-x11-keymap ch "" fr ""
[brodard@archlinux ~]$ cat /etc/X11/xorg.conf.d/00-keyboard.conf 
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "ch"
        Option "XkbVariant" "fr"
EndSection

It does't work, even after a reboot

So I tried to set vconsole.conf

[brodard@archlinux ~]$ cat /etc/vconsole.conf 
KEYMAP=fr_CH-latin1.map.gz

I tried to set the KEYMAP differently --> fr_CH or fr_CH-latin1

It didn't work. Even in other programs after reboots, the keyboard is always set in us.

What's bothering me is what we can see in the first output, it seems the us keyboard layout is overriding the swiss-french keyboard layout. I've checked other forums and tried their solutions, nothing seems to work.

Last edited by Klems (2017-10-07 12:20:58)

Offline

#2 2017-10-07 11:37:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,874

Re: Change keyboard layout Problem [SOLVED]

gnome has a tendency to override things with values from gnome-settings, so you should set your locale/layout there (as well)
Also please notice that gnome defaults to wayland what means things like xterm/setxkbmap will run under xwayland instances - you should ensure this behavior exists when explicitly logging into a "gnome on xorg" session.

Offline

#3 2017-10-07 11:53:32

onslow77
Member
Registered: 2014-09-21
Posts: 283

Re: Change keyboard layout Problem [SOLVED]

Klems wrote:

It seems like us keyboard is overwriting the swiss-french keyboard layout.

Hello Klems!

According to Your output from "setxkbmap -print -verbose 10" the "us" layout is set as primary.

I suggest you take Gnome out of the picture and setup the correct keyboard layout for console and Xorg first. After that You can add Gnome to the mix.

Here is how to: 
- set keyboard layout in console
- set keyboard layout in Xorg

Regards
Martin

Last edited by onslow77 (2017-10-07 11:55:13)

Offline

#4 2017-10-07 12:18:02

Klems
Member
Registered: 2017-10-07
Posts: 4

Re: Change keyboard layout Problem [SOLVED]

So it seems Gnome overrides some parameters.
I uninstalled it and I'm on my way to I3wm.
As soon as Gnome was uninstalled, the keyboard layout was correct.
You can change the keyboard layout graphically in gnome system, but I don't want to use Gnome anyway.
Thank you a lot for helping me !

Last edited by Klems (2017-10-07 12:20:04)

Offline

Board footer

Powered by FluxBB