site  contact  subhomenews

Xorg and console keyboad layouts

January 27, 2010 — BarryK
I fixed a bug that has been in Puppy for a very long time, maybe always.

When the Xorg Wizard is run, it looks at the console keyboard layout as specified in /etc/keymap and puts an appropriate value into this line in /etc/X11/xorg.conf:

Option "XkbLayout" "us" #xkeymap0

That's fine, however if the Keyboard Wizard is used to change to a different layout, /etc/keymap gets changed and the console layout is updated, however the layout in xorg.conf is not changed.

I have modified /usr/bin/xwin, which is the script that is used to start X, to check for a mismatch between console and Xorg keyboard layout and if found then fix it.

Note, the same situation can occur if the "pkeys" kernel boot parameter is used to change the current setting in /etc/keymap. That is fixed also.

This fix is in Woof, that I will upload soon.

Comments

NLS problem
Username: pakt
Barry, I may have found the cause of dead keys when keyboard is set to Swedish. Details here: http://www.murga-linux.com/puppy/viewtopic.php?p=386567#386567

Typo error in xwin
Username: mories
"There is a typo error in xwin at the line that change Option "XkbLayout" "us" #xkeymap0 In sed -i -e "${xkPATTERN}" ..... must be sed -i -e "${[b]s[/b]kPATTERN}" ... The error cause no change keyb layout in X.

Re xwin typo
Username: BarryK
"mories, Thanks for finding that, I've fixed it.

modifying xorg.conf
Username: shinobar
"Hi Barry, I think the code modifying xorg.conf should be performed in input-wizard and not in xwin. Because the user may like to edit xorg.conf by hand and not modified at starting X.

xwin to input-wizard
Username: BarryK
"shinobar, yes, I think that I will have to move it. I put it in xwin because I was thinking what if someone edited /etc/keymap file, or booted with a different pkeys value. Then xwin would catch those changes and make sure the that xorg is also set correctly. But then there is the problem, if leave it in xwin, and user edits xorg.conf, restarts X, then xwin will change it back.


Tags: woof