Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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'm using systemd-nspawn to "boot" a second Linux OS from a USB hard disk. I'd like to launch that OS's Gnome Desktop in a second X server running on the same machine on a different tty than the Desktop that is already running on tty1.

e.g. I have Gnome on tty1 running on the host machine. I'd like to launch the USB drive's KDE desktop in tty2 (in a 2nd X server I'm assuming). It seems possible somehow.

How can it be done?

share|improve this question
up vote 1 down vote accepted

It's possible, but not easy...

First, you have to bind mount tty2 and modules, so spawn the container using:

systemd-nspawn -bD /system/arch --bind /dev/tty2 --bind /lib/modules

Of course, spawn the container in tty2 terminal... then, you need to start an X-server in another tty, which somehow is failing in my device

startx -display :1 -- :1 vt2 &

Besides, you've better just freeze one server and start another in tty2, as both running would conflict and would be resource waster.

P.S.: There is also a guy that ran a container's program under host's xserver, here http://dabase.com/e/12009/

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.