You are not logged in.

#1 2014-07-24 19:12:09

waltz
Member
Registered: 2014-07-24
Posts: 5

Cannot change keyboard layout on login

So i've been changing my keyboard layout with "setxkbmap id" and it works when i type it in a terminal.
However, writing the same line to ~/.xinitrc isn't working. I tried .bashrc and .bash_profile aswell with no luck.

Any ideas?

Offline

#2 2014-07-24 19:17:19

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Cannot change keyboard layout on login

You need to create a file, /etc/X11/xorg.conf.d/00-keyboard.conf:

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "gb"
        Option "XkbModel" "pc105"
        Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

https://wiki.archlinux.org/index.php/Ke … tion_files
EDIT: That one's mine, edit to taste... tongue

Last edited by Head_on_a_Stick (2014-07-24 19:17:54)


Jin, Jîyan, Azadî

Offline

#3 2014-07-24 19:30:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Cannot change keyboard layout on login

Post your ~/.xinitrc.

Last edited by karol (2014-07-24 19:30:57)

Offline

#4 2014-07-24 19:32:10

j.pinje
Member
Registered: 2014-07-24
Posts: 7

Re: Cannot change keyboard layout on login

Or you can use it like I do..Wich is edit the 10-evdev.conf and add

Option "XkbLayout" "se"

replace se with your country.

cat /etc/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"
        Option "XkbLayout" "se"
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

If you mean your console keyboard then edit your

/etc/vconsole.conf
cat /etc/vconsole.conf 
KEYMAP=fi-latin1.map.gz 

Change to your country of course mine is Swedish.


“I would love to change the world, but they won’t give me the source code”

Offline

#5 2014-07-24 19:33:04

waltz
Member
Registered: 2014-07-24
Posts: 5

Re: Cannot change keyboard layout on login

Head_on_a_stick's solution worked, thanks!

Here's my .xinitrc:

exec i3
setxkbmap fi

Offline

#6 2014-07-24 19:35:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Cannot change keyboard layout on login

Reverse the lines in your .xinitrc. 'exec' line has to come last - read the wiki article on ~/.xinitrc: https://wiki.archlinux.org/index.php/Xinitrc (the first note):

Make sure to uncomment only one exec line, since that will be the last command run from the script; all the following lines will just be ignored.

Last edited by karol (2014-07-24 19:37:02)

Offline

#7 2014-07-24 19:39:32

waltz
Member
Registered: 2014-07-24
Posts: 5

Re: Cannot change keyboard layout on login

Thanks karol, noted!

Offline

#8 2014-07-24 21:53:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Cannot change keyboard layout on login

Seems that you've solved your problem.
Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

Board footer

Powered by FluxBB