I want to run a remote X session in windowed mode. I cannot find any help in the Manual of X, nor in the internet.

Does anyone know how to do that? By now I'm doing: X :2 -query hostname

Thanks in advance

up vote 1 down vote accepted

Xnest should be your friend here. Install the xnest package and use

Xnest -query hostname
  • 1
    I already tried Xnest out. It crashed pretty randomly and I need this for work. Thanks anyway! Other suggestions? – entonjackson Sep 7 '11 at 11:43
  • 2
    OK, it's been a while (years) that I used Xnest. It seems that Xnest isn't up to date any more, I does not support every extension for X that is available now. A more up to date solution seems to be Xephyr (manpages.ubuntu.com/manpages/lucid/man1/Xephyr.1.html) - basically the same as Xnest with more extensions. Haven't tried this. – Thomas Sep 7 '11 at 12:00
  • I already tried that out as well ;) Problem here is: keyboard arrow keys don't work. – entonjackson Sep 7 '11 at 12:28

I solved my problem! Thanks to Thomas! Xephyr did, what i needed!

And for anyone who has problems with some keys not working, add following option to Xephyr:

-keybd ephyr,,,xkbmodel=evdev

So my command looks like this now:

Xephyr :2 -keybd ephyr,,,xkbmodel=evdev -query hostname

Good luck!

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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