When I start Xephyr and LXDE session inside:

$ Xephyr :1 -screen 1920x1054 -nolisten tcp -reset -terminate
$ DISPLAY=:1 startlxde

some keys are not working properly, such as Up, PageUp, PageDown. Looking with xev, I see very funny key names:

PageUp:   Hiragana
Up:       Katakana
PageDown: Control_R
Left:     Henkan_Mode
Down:     KP_Enter
Right:    Muhenkan

enter image description here

enter image description here

Obviously, in normal LXDE session (without Xephyr), everything works normally.

One thing that is relevant here:

I am not using udev daemon on my system. (I just needed to add Option "AutoAddDevices" "Off" to /etc/X11/xorg.conf to make X work without udev.

When I turn udev back on, the keys inside Xephyr work OK. But that is not a solution for me.

How can I diagnose and fix this problem (without udev) ?

  • +1 Had this issue several years ago; Last time I had used Xephyr, the keyboard mapping was working properly when running in VirtualBox emulator. I didn't manage to figure out why.
    – user125388
    Aug 21, 2016 at 16:25

3 Answers 3


You can try to read the keyboard configuration of :0 with setxkbmap and to set it on :1 with xkbcomp:

setxkbmap -display :0 -print | xkbcomp - :1
  • 1
    that works great ! You are a genius. Aug 29, 2016 at 20:35

An even shorter version of mviereck's suggestion:

xkbcomp :0 :1
  • when I do this, my whole Xephyr session crashes Dec 31, 2019 at 8:41
  • Yes, mine, too. Xephyr 2:1.20.4-1 on Debian Buster. Looks like a bug.
    – uli42
    Jan 1, 2020 at 14:46

There's an answer to a similar problem on Superuser.

The solution is to start Xnest / Xephyr with -kb.

There's a bug in relation and it still has the status "NEW". Strange, but it may apply, though 7 years old.

Take a look at the other answers in case -kb didn't fix it.

And see this one to get an insight into the -keybd option.

  • the -kb option does not exist anymore, and the new -keybd does not help either, when used as Xephyr :1 -screen 1920x1054 -keybd ephyr,,,xkbmodel=pc105,xkblayout=us,xkbrules=evdev,xkboption=ctrl:nocaps -nolisten tcp -reset -terminate. I suspect, the problem is related to the fact, that udev daemon did not "set" up something that Xephyr needs. As I said, the keyboard works OK when I boot with udev enabled. Aug 21, 2016 at 20:35
  • How to pass -kb in firejail? 2 days ago

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .