Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In my distribution (Slackware 13.37), the console keyboard layout is chosen among some of those available in /usr/share/kbd/keymaps ' sub directories, coming from the kbd package.

Under X instead the keyboard layout is chosen in a "layout" list included in the file /etc/X11/xkb/rules/evdev.lst.

Does anybody knows a way to, given some console keyboard layout, map it to an X keyboard layout, in order to set up accordingly the "XkbLayout" option in an X configuration file?

I am specially interested in knowing the way other distributions than Slackware deal with this for initial configuration.

share|improve this question

2 Answers 2

Well, how I understand it, in Debian, in /etc/default/keyboard you set the variables XKB{MODEL,LAYOUT,VARIANT,OPTIONS} with values you would use for XKB.

Then, at bootup, setupcon(1) reads those variables and calls ckbcomp(1), which, as its manpage says, “compile[s] a XKB keyboard description to a keymap suitable for loadkeys or kbdcontrol“.

Finally, loadkeys(1) is called on the compiled file.

HTH.

(Or maybe you meant the opposite. I'm not really sure now...)

share|improve this answer
    
Slackware 13.37 doesnt have /etc/default/keyboard –  LnxSlck Sep 9 '12 at 17:42

There is no magic, the distributions just have to maintain an array of triplets: "keyboard layout text description", "console keyboard layout options", "X11 keyboard layout options", and provide a tool to select and configure the layouts.

If the distribution doesn't do that, then it is up to the user to manually configure console and X11 keyboard, and thus up to the user to make them coherent together.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.