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?


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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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