#479784 xmodmap in .xsession breaks keyboard layout

Package:
xserver-xorg-core
Source:
xorg-server
Description:
Xorg X server - core server
Submitter:
Jakub Wilk
Date:
2011-12-09 23:15:11 UTC
Severity:
normal
#479784#5
Date:
2008-05-06 17:46:51 UTC
From:
To:
After the last upgrade, my keyboard layout got broken. For example,
RightAlt+O produces superscript-3 instead of o-with-acute.

$ grep -B1 -A5 Keyboard /etc/X11/xorg.conf
Section "InputDevice"
         Identifier      "Generic Keyboard"
         Driver          "kbd"
         Option          "XkbRules"      "xorg"
         Option          "XkbModel"      "pc105"
         Option          "XkbLayout"     "pl"
EndSection

$ cat .xsession
#!/bin/sh
/usr/bin/xmodmap "$HOME/etc/x11/xmodmap"
exec /usr/bin/x-terminal-emulator

$ cat ~/etc/x11/xmodmap
keycode 233 = Next_Virtual_Screen
keycode 234 = Prev_Virtual_Screen
keycode 222 = Terminate_Server
keycode 231 = XF86Refresh
keycode 178 = XF86HomePage
keycode 229 = XF86Search
keycode 236 = XF86Mail

remove Lock = Caps_Lock
keysym Caps_Lock = Escape
keysym Escape = Caps_Lock
add Lock = Caps_Lock



If I comment out xmodmap invocation, everything goes fine.

#479784#10
Date:
2008-05-12 03:36:48 UTC
From:
To:
Jakub Wilk wrote:

Can you try commenting lines out of the xmodmap file and thus finding
which ones causes the problem?

Thanks,
Brice

#479784#15
Date:
2008-05-12 09:42:20 UTC
From:
To:
* Brice Goglin <Brice.Goglin@ens-lyon.org>, 2008-05-12, 05:36:

I have found the following minimal examples:

$ cat ~/etc/x11/xmodmap
remove Lock = Caps_Lock

and

$ cat ~/etc/x11/xmodmap
add Lock = Caps_Lock

#479784#20
Date:
2008-05-27 10:00:45 UTC
From:
To:
Please, try following:
delete the xmodmap line from .xsession and run it manually after X11 startup.

Why? My ion3 complains that X does not know XF86*** keysyms after startup,
but when I restart it (only ion3), it doesn't complain anymore and loads
its keybindings properly. Maybe it is related, maybe not.

#479784#25
Date:
2008-06-13 11:14:46 UTC
From:
To:
I've been having the same issue when xmodmap is executed from .xinitrc;
it works fine if I run xmodmap manually after X11 is started.

This problem appears to be similar to a few previously closed reports:
#444025, #443044, #443473.

#479784#30
Date:
2008-07-12 13:18:18 UTC
From:
To:
reassign 479784 xserver-xorg-core 2:1.4.2-1
kthxbye
Apparently the issue appears when running xmodmap or setxkbmap before
any key has been pressed.  The map on the virtual core keyboard is
changed, but is then overwritten by the map from the actual physical
device when the first key is pressed.

Cheers,
Julien

#479784#37
Date:
2010-01-07 22:18:30 UTC
From:
To:
Hi,

this issue still seems to be present, see for example
http://bugs.freedesktop.org/show_bug.cgi?id=24552

Greetings,
Joachim