You are not logged in.
Pages: 1
Topic closed
Hi everyone,
I just set up Arch on my Samsung NC20 a few days ago after a couple of years on Ubuntu. I'm enjoying it so far, but I've run into the following problem. I've tried to set my keyboard to 'uk' but I only get a UK keyboard at login time. As soon as I launch an X client, I am back with a US keyboard. (In case it matters, I've mainly been using wmii, LilyTerm, and Firefox. I have no desktop.)
My /etc/vconsole.conf file reads
KEYMAP=uk
and I set up a file /etc/X11/xorg.conf.d/99-keyboard-locale.conf that reads as follows:
Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "yes"
Option "XkbLayout" "uk"
EndSection
The option 'uk' is indeed present on my machine (although I tried 'gb' too, to no avail). When I look in /usr/share/kbd/keymaps/i386/qwerty I find uk.map.gz; and I get a UK keyboard when I log in, as I said.
One weird thing is that if I run
setxkbmap -layout uk
from the command line in LilyTerm, I get the following:
No protocol specified
Cannot open display ":0"
I don't know if that's relevant.
Can anyone help? How can I set my keyboard to 'uk' for X clients?
Best,
PaulE
Last edited by PaulE (2012-12-21 22:16:05)
Offline
As far as I know, there is no uk layout for xorg and keymap ≠ X keyboard layout. Always check /usr/share/X11/xkb/rules/xorg.lst.
cat /usr/share/X11/xkb/rules/xorg.lst | grep UK
gb English (UK) # keyboard layout (following lines are variants)
extd gb: English (UK, extended WinKeys)
intl gb: English (UK, international with dead keys)
dvorak gb: English (UK, Dvorak)
dvorakukp gb: English (UK, Dvorak with UK punctuation)
mac gb: English (UK, Macintosh)
mac_intl gb: English (UK, Macintosh international)
colemak gb: English (UK, Colemak)Try adding setxkbmap -layout gb to your .xinitrc file and see if it solves the problem.
EDIT: Added a comment to the first line of output.
Last edited by ximun (2012-12-21 15:55:21)
"The problem is, after a week of intense googling, we’ve started to burn out on knowing the answer to everything. God must feel that way all the time. I think people in the year 2020 are going to be nostalgic for the sensation of feeling clueless." Douglas Coupland - jPod
Offline
Edit /etc/X11/xorg.conf.d/00-keyboard.conf to fit your needs, ideally you are using the evdev driver. Mine reads
# 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" "latam,us"
Option "XkbVariant" ","
EndSection(Hmm. Not sure what package created that file, but the answer is valid nonetheless).
Last edited by vorbote (2012-12-21 16:36:33)
I break things and put them back together for fun and sometimes profit, because it is the only way to learn.
Offline
Thank-you, ximun and vorbote! I already had an xorg.conf.d file set up as vorbote advised, but ximun was evidently perfectly correct in saying that I needed 'gb' and not 'uk'. I've added
setxkbmap -layout gbto my .xinitrc file and it works perfectly now.
Thanks again. I guess this can be marked as SOLVED.
PaulE
Offline
Glad it worked. Nonetheless, the xorg.conf.d file should suffice to set the layout, so I don't know what's up with that.
Thanks again. I guess this can be marked as SOLVED.
Indeed, you can edit the OP and prepend the [SOLVED] tag to the thread title.
"The problem is, after a week of intense googling, we’ve started to burn out on knowing the answer to everything. God must feel that way all the time. I think people in the year 2020 are going to be nostalgic for the sensation of feeling clueless." Douglas Coupland - jPod
Offline
Glad it worked. Nonetheless, the xorg.conf.d file should suffice to set the layout, so I don't know what's up with that.
I was thinking the same. But also here on my Gnome 3 system the .conf alone is not sufficient. Instead I have to use setxkbmap, too. Thus, it might be DE related.
Offline
Glad it worked. Nonetheless, the xorg.conf.d file should suffice to set the layout, so I don't know what's up with that.
I was thinking the same. But also here on my Gnome 3 system the .conf alone is not sufficient. Instead I have to use setxkbmap, too. Thus, it might be DE related.
No, you don't need setxkbmap. Use the configuration tools provided by the desktop environment. In the case of GNOME3 the right place is the Region and Language control panel. KDE, XFCE and LXDE each have their own tools to accomplish the same thing (and please don't hijack threads, this one was already marked as solved).
Last edited by vorbote (2012-12-22 11:29:51)
I break things and put them back together for fun and sometimes profit, because it is the only way to learn.
Offline
I tried including setxkbmap in my .xinitrc, and it never worked until I realized that I must put it BEFORE starting the desktop environment. That is,
# This ~/.xinitrc works fine (Both lines are executed)
setxkbmap -option caps:swapescape
exec i3and
# This ~/.xinitrc does not work (The second line does not have any effect)
exec i3
setxkbmap -option caps:swapescapeLast edited by zdavid0123 (2018-02-26 18:51:19)
Offline
Please don't necrobump old threads, especially with information that is already in the wiki.
Putting this old thread to sleep...
Offline
Pages: 1
Topic closed