[Sugar-devel] Better workaround for Xephyr keyboard problem seen running sugar-emulator (jhbuild run)
Tomeu Vizoso
tomeu at sugarlabs.org
Thu Jun 25 13:14:37 EDT 2009
On Thu, Jun 25, 2009 at 00:16, Dan Krejsa<dan.krejsa at gmail.com> wrote:
> Hi,
>
> I've found what I think is a better workaround for the Xephyr problem seen
> running sugar-emulator, in which keyboard mappings are not inherited from
> the main X server.
>
> One workaround known so far is to go into the Terminal activity
> and run
>
> setxkbmap us
>
> (or whatever keyboard map & options you want). However, that doesn't fix
> all keys,
> in particular it doesn't fix the arrow keys (at least for me). What does
> work
> is to execute, in a host shell outside of the sugar emulator,
>
> xkbcomp $DISPLAY :100
Any idea why it fails in Ubuntu Intrepid with:
Warning: Could not load keyboard geometry for :0.0
BadAlloc (insufficient resources for operation)
Resulting keymap file will not describe geometry
?
Thanks,
Tomeu
> replacing :100 with the actual X display of the Xephyr X server;
> $DISPLAY is of course the name of the encompassing X display in
> which Xephyr runs as a client. This copies the XKB settings from
> the encompassing display to the display under Xephyr.
>
> You have to run xkbcomp after having sent some keyboard events
> to Xephyr -- if you do it before that, it seems not to work for some reason
> that I don't understand well.
>
> That leads me to a really hackish patch to:
>
> sugar-jhbuild/source/sugar/bin/sugar-emulator
>
> adding a -k option that does the xkbcomp to copy the XKB settings to
> Xephyr before starting sugar. The most awkward bit is that I had to
> add code to put an ugly little window in the Xephyr server waiting for an
> initial keystroke before calling xkbcomp. I know very little about X; maybe
> someone can figure out how to avoid that bit.
>
> If you use the patch, start sugar-emulator as follows:
>
> $ ./sugar-jhbuild run sugar-emulator -k &
>
> Briefly tested only under Fedora 11. Enjoy,
>
> [1] http://dev.sugarlabs.org/ticket/342
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
More information about the Sugar-devel
mailing list