3

Is it possible to start a desktop environment entirely in systemd-nspawn or chroot?

I want to be able to boot to a console, then optionally enter a chroot and launch Gnome or another desktop environment.

grandinero
  • 131
  • 4

1 Answers1

3

Launching a DM from chroot is in fact possible (if configured correctly). A thorough tutorial can be found here. The process can be summarized as such:

  1. Mount the special mountpoints (/dev, /proc, etc) from your host to your chroot.
  2. chroot
  3. Start the X server (startx)
  4. Start your display manager

All of the corresponding commands can be synthesized into a bash script for convenience.

belkarx
  • 325
  • 1
  • 9