You are not logged in.
Pages: 1
Hi everyone,
I'm getting a strange behavior with my keymaps. In the console, I've set it (through mkinitcpio hooks) to bepo-latin9, and it works just fine.
However, I don't manage to configure it properly for Xorg. I've edited both my .xinitrc :
setxkbmap fr bepo
exec gnome-session
setxkbmap fr bepo
and my /etc/X11/xorg.conf.d/10-keyboard-layout.conf :
Section "InputClass"
Identifier "keyboard Layout"
MatchIsKeyboard "on"
Option "XkbLayout" "fr"
Option "XkbVariant" "bepo"
Option "XkbOptions" "grp:shifts_toggle"
EndSection
But when I startx, I'm always defaulted to a azerty layout… After that, there is no problem to change the layout using setxkbmap fr bepo:
$ setxkbmap fr bepo
$ setxkbmap -query
rules: evdev
model: pc104
layout: fr
variant: bepo
But then, whenever I switch to another tty, even if I don't log at all, when I switch back to the tty where the x session is started, the keymap is reset to default:
$ setxkbmap -query
rules: evdev
model: pc104
layout: fr,us,fr
variant: ,,oss
I really don't get how the tty switchin can affect the keymap at all… Any thoughts ?
Thanks in advance
Offline
Offline
Here it is
$ localectl
System Locale: LANG=fr_FR.UTF-8
VC Keymap: n/a
X11 Layout: n/a
Offline
Try this:
localectl --no-convert set-X11-keymap fr,bepo,grp:shifts_toggle
Offline
When I execute the command, everything seems to work as expected:
$ localectl --no-convert set-x11-keymap fr,bepo,grp:shifts_toggle
$ localectl
System Locale: LANG=fr_FR.UTF-8
VC Keymap: n/a
X11 Layout: fr,bepo,grp:shifts_toggle
$ setxkbmap -query
rules: evdev
model: pc104
layout: fr
variant: bepo
$ cat /etc/X11/xorg.conf.d/00-keyboard.conf
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "fr,bepo,grp:shifts_toggle"
EndSection
But as soon as I restart x, the keymap is messed up again (even though the localectl settings persists)
$ localectl
System Locale: LANG=fr_FR.UTF-8
VC Keymap: n/a
X11 Layout: fr,bepo,grp:shifts_toggle
$ setxkbmap -query
rules: evdev
model: pc104
layout: fr,us,fr
variant: ,,oss
Offline
Hi, your .xinitrc file should read:
setxkbmap fr bepo &
exec gnome-session
Note the '&' after the setxkbmap command. Do not put one after the exec gnome session and no commands after this will be executed anyway.
Hope this helps.
Offline
I just tried this modification and it didn't work either.
Offline
Do you have another keyboard configuration file in /usr/share/X11/xorg.conf.d?
If so, (re)move it.
Offline
I only have three conf file in xorg.conf.d:
$ ls /etc/X11/xorg.conf.d
00-keyboard.conf 10-keyboard-layout.conf 90-monitor.conf
The first one is the one automatically generated by localectl, the second one is the one I showed in the first post and the last one contains nothing keyboard related.
Offline
Are KEYMAP and FONT set in /etc/vconsole.conf ?
Offline
I only have three conf file in xorg.conf.d:
$ ls /etc/X11/xorg.conf.d 00-keyboard.conf 10-keyboard-layout.conf 90-monitor.conf
The first one is the one automatically generated by localectl, the second one is the one I showed in the first post and the last one contains nothing keyboard related.
Read my post again -- carefully.
You are looking in the wrong place...
EDIT: Also, delete the 10-keyboard-layout.conf -- you shouldn't need it.
Last edited by Head_on_a_Stick (2015-05-07 20:18:29)
Offline
Are KEYMAP and FONT set in /etc/vconsole.conf ?
Here's the content of /etc/vconsole.conf:
$ cat /etc/vconsole.conf
FONT=ter-g32b
Read my post again -- carefully.
You are looking in the wrong place...
Ooups, read a bit fast indeed. Here is the correct listing :
$ ls /usr/share/X11/xorg.conf.d
10-evdev.conf 10-quirks.conf 50-synaptics.conf nvidia-drm-outputclass.conf
The first one mentions a bit of keyboard conf, but no keymap :
$ cat /usr/share/X11/xorg.conf.d/10-evdev.conf
#
# Catch-all evdev loader for udev-based systems
# We don't simply match on any device since that also adds accelerometers
# and other devices that we don't really want to use. The list below
# matches everything but joysticks.
Section "InputClass"
Identifier "evdev pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Do you think it might be the source of the interference?
EDIT: just deleted the superfluous file as you suggested, but it didn't change anything
Last edited by alcinos (2015-05-07 20:28:21)
Offline
Do you think it might be the source of the interference?
No, do not delete that file.
I'm stumped here, sorry.
One last roll of the dice: remove the `setxkbmap` commands from your .xinitrc and add this stanza to the start of the file (before `exec gnome-session`):
#!/bin/sh
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
Then run the `localectl` command again and reboot.
Offline
Also add KEYMAP=fr to /etc/vconsole.conf and reboot.
Offline
alcinos wrote:Do you think it might be the source of the interference?
No, do not delete that file.
I'm stumped here, sorry.
One last roll of the dice: remove the `setxkbmap` commands from your .xinitrc and add this stanza to the start of the file (before `exec gnome-session`):
#!/bin/sh if [ -d /etc/X11/xinit/xinitrc.d ]; then for f in /etc/X11/xinit/xinitrc.d/*; do [ -x "$f" ] && . "$f" done unset f fi
Then run the `localectl` command again and reboot.
Well I'm afraid it didn't change anything…
However, we seem to be looking at issues affecting the init phase of the Xorg server, but maybe the problem isn't here. The oddest thing is the problem of keymap switch when I switch to a tty and back to the server. Is there anything else that could interfere in the keymap configuration?
@paneless: adding this line doesn't change anything to what I get.
Offline
Ok Alcinos, can you first confirm that you installed as per the Arch wiki installation guide. If so, was your .xinitrc copied from/etc/X11/xinit/xinitrc? Have you commented out the non applicable 'exec' commands? Sorry lots of questions but...
Last edited by paneless (2015-05-07 22:01:01)
Offline
Well I mostly followed the installation guide, but with some variations (most notably, I use a fully encypted setting).
My xinitrc now contains only the "exec gnome session" line plus the lines Head_on_a_Stick advised me to and.
Offline
Pages: 1