Archive for February, 2006

SUSE AutoYaST setting X keyboard layout to German

Wondering why your Y and Z keys are swapped in X? That’s probably because the keyboard layout is set to German (de) instead of English (us). Did you say you used SUSE AutoYaST and had it configured for the english-us keyboard mapping? Well, we had a couple of AutoYaST configuration files and the layout problem only occurred for a couple of them. I compared the XML files and noticed that in the keyboard section, the ones that didn’t work contained extra settings before the keymap setting (I didn’t make them!). I removed the entries and now the keyboard layout is set correctly!

I tried to search for the XML schema and was only able to find this one page with any useful information. Looking at it, we can see that the only setting that should be defined under the keyboard section is keymap. If there’s anything else in that section, the section is invalid and therefore skipped! I guess the default (alphabetically?) keymap setting is German (de), hence our problem. Here’s a little excerpt from an XML file to point out what to look for:

<?xml version="1.0"?>
<!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd">
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
  <install>
    ...
    <general>
      ...
      <keyboard>
        <keymap>english-us</keymap>
      </keyboard>
      <language>en_US</language>
      ...

There shouldn’t be anything in the keyboard section except for keymap. Anyway, if you don’t want to go through the trouble of reinstalling the OS, you can easily change the X keyboard layout (assuming you’re using Xfree86). At the shell, open up /etc/X11/XF86Config and look for the following lines. Make sure the XkbLayout setting is set to ‘us’. Then restart the X server by pressing Ctrl-Alt-Backspace.

Section "InputDevice"
  Driver       "Keyboard"
  Identifier   "Keyboard[0]"
  Option       "Protocol" "Standard"
  Option       "XkbLayout" "us"
  Option       "XkbModel" "pc104"
  Option       "XkbRules" "xfree86"
EndSection

Add comment February 16th, 2006 at 03:30pm


Calendar

February 2006
S M T W T F S
« Jan   Jan »
 1234
567891011
12131415161718
19202122232425
262728  

Posts by Month

Posts by Category