7

Is it possible to have Ubuntu Desktop running in an LXC/LXD container on top of Ubuntu Server, displaying Ubuntu Desktop's graphical X session on the physical screen that Ubuntu Server outputs to?

Whether it makes sense or not, my idea is to separate the Server "PC" from the Desktop "PC". I intend to set up an Intel NUC machine as a personal web server as well as a HTPC machine connected to my TV.

muru
  • 207,228

4 Answers4

3

Yes it is possible with LXD.

I have my custom LXD Image server. Please do the following:

sudo lxc remote add codedream lxdimage.codedream.ml --public 
sudo lxc launch codedream:ubuntu1604-kodhe-xfcedesktop my-desktop -c "security.privileged=true" -c "security.nesting=true"

Or if you prefer unity desktop:

sudo lxc remote add codedream lxdimage.codedream.ml --public 
sudo lxc launch codedream:ubuntu1604-kodhe-unitydesktop my-desktop -c "security.privileged=true" -c "security.nesting=true"

Also now have ukui:

sudo lxc remote add codedream lxdimage.codedream.ml --public 
sudo lxc launch codedream:ukui my-desktop -c "security.privileged=true" -c "security.nesting=true"

After, install NoMachine, and connect to lxd container by IP and port 4000. Username=kodhe, Password=1. To view IP:

sudo lxc list my-desktop
James S
  • 91
2

(Not definitely true:)That won't work!(/Not definitely true) What would work though, is doing it the other way round: install the Desktop on your machine and then use LXD to run the web server.

Also, if you have a current NUC box, you should have processor virtualization and could run KVM. I'm not familiar with that, but it seems your chances are better with a true VM solution...

OttoEisen
  • 776
0

The answer is Yes, as mentioned in previous answers. For good how to's, I highly recommend this playlist created by the maintainer of the LXD project Stéphane Graber: https://www.youtube.com/playlist?list=PLddduKsl-KEhleT9VTR4hbtlNdtMr6cFd , See video #23 (and enjoy the full playlist).

0

This might help https://github.com/ustuehler/lxc-desktop It seems you can run multiple desktop instances in lxc containers, however I'm not sure why you would want the server part to have a desktop interface

Davei
  • 1