Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 1 down vote accepted

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

Xnest -query hostname
share|improve this answer
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
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 ( - 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!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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