You are not logged in.

#1 2013-10-31 17:20:18

fredu
Member
Registered: 2013-10-30
Posts: 11

[SOLVED] Keyboard layout problem

Every time I reboot my system my keyboard layout changes back to US, even though I have "setxkbmap fi &" in .xinitrc.
Is there a way to change the keyboard layout without having to manually do it every time I restart my computer.

Last edited by fredu (2013-10-31 19:00:08)

Offline

#2 2013-10-31 17:25:01

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

Re: [SOLVED] Keyboard layout problem

~/.xinitrc is only for X. Your keyboard setup may be different in the tty.
Do you boot straight to X?
What's the output of 'localectl' after you boot, but before manual adjustments?

Last edited by karol (2013-10-31 17:27:08)

Offline

#3 2013-10-31 17:26:40

frogcrush
Member
From: British Columbia, Canada
Registered: 2013-10-31
Posts: 3

Re: [SOLVED] Keyboard layout problem

Have you tried:

# nano /etc/vconsole.conf

KEYMAP=de-latin1
FONT=Lat2-Terminus16

From the Beginner's Guide?

EDIT: My bad, that's just for TTY's, it appears.

Last edited by frogcrush (2013-10-31 17:49:05)

Offline

#4 2013-10-31 17:26:52

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

Re: [SOLVED] Keyboard layout problem

What's the output of 'setxkbmap -query'?

Offline

#5 2013-10-31 17:45:09

fredu
Member
Registered: 2013-10-30
Posts: 11

Re: [SOLVED] Keyboard layout problem

@karol: the output for 'localectl' after I boot is:

"System Locale: LANG=en_US.UTF-8
VC Keymap: fi
X11 Layout: n/a"

and for 'setxkbmap -query' it is:

"rules: evdev
model: pc104
layout: us"


@frogcrush that doesn't work for X

Offline

#6 2013-10-31 17:50:18

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] Keyboard layout problem

I set X keymap in .xinitrc without the '&' at the end of the command:

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

setxkbmap carpalx
xset -dpms
xset s off
exec startxfce4

But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#7 2013-10-31 18:01:09

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

Re: [SOLVED] Keyboard layout problem

alphaniner wrote:

I set X keymap in .xinitrc without the '&' at the end of the command

Me too.


fredu, do you boot straight to X or did you run 'localectl' from the tty?

Offline

#8 2013-10-31 18:10:48

fredu
Member
Registered: 2013-10-30
Posts: 11

Re: [SOLVED] Keyboard layout problem

@karol straight to X

Offline

#9 2013-10-31 18:15:55

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

Re: [SOLVED] Keyboard layout problem

I get

$ localectl
   System Locale: LANG=en_US.UTF-8
                  LC_COLLATE=C
                  LC_MESSAGES=C
       VC Keymap: pl2
      X11 Layout: pl

even in the tty, before booting X.
You can set the layouts like this:

#  localectl set-x11-keymap pl

Read 'man localectl' for details.

Offline

#10 2013-10-31 18:34:25

fredu
Member
Registered: 2013-10-30
Posts: 11

Re: [SOLVED] Keyboard layout problem

@karol thanks, that worked.

Offline

#11 2013-10-31 18:49:25

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

Re: [SOLVED] Keyboard layout problem

Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

Board footer

Powered by FluxBB