Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

x11 - Error loading keymap

When start X11 I get the following error messages:


(EE) Error loading keymap /tmp/server-0.xkm

(EE) XKB: Failed to load keymap. Loading default keymap instead.


I assume this causes not having an appropriate keyboard model and layout set:


# setxkbmap -query

rules: base

model: empty

layout: empty



Within X11 the keyboard mapping is ok though - however if I login to a Linux server via openNX the key mapping becomes totally messed up.

This was not the case with Snow-Leopard (10.6.6).


I re-installed X11, tried with a fresh user definitevly not having any .X11 settings somewhere - no change...


Any help greatly appreciated!

MacBook Pro, Mac OS X (10.7)

Posted on Aug 5, 2011 10:56 PM

Reply
8 replies

Aug 16, 2011 5:31 PM in response to artemiy86

Similar problem. Found a bit help at: http://watchtowerlibraryformac.info/en/pages/2-faq/content - check the Xmodmap file there...


On the remote host save as ~/.Xmodmap

I actually there make a call in my login script (~/.bashrc in my case): xmodmap ~/.Xmodmap


This helps, however for me R/L shift(s) do NOT work and shift lands under alt(option) if I remember correctly...


Let me know if this helped or if you have found another solution please let me know.


Anyhow, this is dissapointing... Apple could simply make a keymaps for X11 available and robust and perhaps optional to revert to Snow etc.

Aug 16, 2011 11:37 PM in response to assert

Yup - that's the way to go!


Here's a cookbok that also fixes the modifier keys:


Retrieve keymap for your local X11 terminal and store it as .Xmodmap on the remote machine:

xmodmap -pke > /remote-machine/.Xmodmap


Get your modifier keys:


xmodmap -pm


output on my machine:

shift Shift_L (0x40), Shift_R (0x44)

lock Caps_Lock (0x41)

control Control_L (0x43), Control_R (0x46)

mod1 Mode_switch (0x42), Mode_switch (0x45)

mod2 Meta_L (0x3f), Meta_R (0x47)


reformat and attach to the .Xmodemap file generated erlier


Example:

clear shift

add shift = Shift_L

add shift = Shift_R

add lock = Caps_Lock

clear control

add control = Control_L

add control = Control_R

clear mod1

add mod1 = Mode_switch

add mod1 = Mode_switch

clear mod2

add mod2 = Meta_L

add mod2 = Meta_R


Make sure the .Xmodemap gets loaded on the remote machine - as described in the previous post.

Sep 1, 2011 10:38 PM in response to mwilhelm

I'm sorry - it should read: /<remote-machine>/.Xmodmap where <remote-machine> is the path to the remote home directory you're trying to connect to via NX,

If it's not mounted on your local Mac you can also redirect the output of xmodmap to some local fileand transfer it to your remote home directory by other means and rename it to

.Xmodmap

Hope this helps - hobo

Sep 12, 2011 11:48 AM in response to Hobo

This is so close. Everything works great except upper case E. It just comes out lower case. Here is the output of xev when I type an upper case D and an upper case E. Very strange.


Any ideas?


Thanks.


KeyPress event, serial 29, synthetic NO, window 0x1600001,

root 0x57, subw 0x0, time 1593186034, (166,119), root:(176,192),

state 0x0, keycode 64 (keysym 0xffe1, Shift_L), same_screen YES,

XLookupString gives 0 bytes:

XmbLookupString gives 0 bytes:

XFilterEvent returns: False



KeyPress event, serial 29, synthetic NO, window 0x1600001,

root 0x57, subw 0x0, time 1593186844, (166,119), root:(176,192),

state 0x1, keycode 10 (keysym 0x44, D), same_screen YES,

XLookupString gives 1 bytes: (44) "D"

XmbLookupString gives 1 bytes: (44) "D"

XFilterEvent returns: False



KeyRelease event, serial 29, synthetic NO, window 0x1600001,

root 0x57, subw 0x0, time 1593186934, (166,119), root:(176,192),

state 0x1, keycode 10 (keysym 0x44, D), same_screen YES,

XLookupString gives 1 bytes: (44) "D"

XFilterEvent returns: False



KeyRelease event, serial 29, synthetic NO, window 0x1600001,

root 0x57, subw 0x0, time 1593187384, (166,119), root:(176,192),

state 0x1, keycode 64 (keysym 0xffe1, Shift_L), same_screen YES,

XLookupString gives 0 bytes:

XFilterEvent returns: False



KeyPress event, serial 29, synthetic NO, window 0x1600001,

root 0x57, subw 0x0, time 1593189713, (166,119), root:(176,192),

state 0x0, keycode 64 (keysym 0xffe1, Shift_L), same_screen YES,

XLookupString gives 0 bytes:

XmbLookupString gives 0 bytes:

XFilterEvent returns: False



KeyPress event, serial 29, synthetic NO, window 0x1600001,

root 0x57, subw 0x0, time 1593190489, (166,119), root:(176,192),

state 0x1, keycode 22 (keysym 0x65, e), same_screen YES,

XLookupString gives 1 bytes: (65) "e"

XmbLookupString gives 1 bytes: (65) "e"

XFilterEvent returns: False



KeyRelease event, serial 29, synthetic NO, window 0x1600001,

root 0x57, subw 0x0, time 1593190568, (166,119), root:(176,192),

state 0x1, keycode 22 (keysym 0x65, e), same_screen YES,

XLookupString gives 1 bytes: (65) "e"

XFilterEvent returns: False



KeyRelease event, serial 29, synthetic NO, window 0x1600001,

root 0x57, subw 0x0, time 1593191276, (166,119), root:(176,192),

state 0x1, keycode 64 (keysym 0xffe1, Shift_L), same_screen YES,

XLookupString gives 0 bytes:

XFilterEvent returns: False

Sep 12, 2011 3:20 PM in response to sandbender

Sorry Sandbender, I just want to confirm what does work for me.


Below is the relevant part of the .Xmodmap on the remote machine (note: I do NOT touch the mod1 and mod2 - see Hobo above). (I see your e is recognized as 22 so this is OK). In case you do the same as in Hobo's post this one will not help.


clear shift

add shift = Shift_L

add shift = Shift_R

clear control

add control = Control_L

add control = Control_R

add lock = Caps_Lock


keycode 22 = e E dead_acute U2030

x11 - Error loading keymap

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.