@marbetschar Thanks for looking into all this.
Another example of an applet to launch systems can be found in
multipass (available as a snap package).
multipass creates VMs and is sort of similar to LXD VMs. They have created an applet to launch terminal windows into the VMs. No GUI support to run applications from within the VM, just a nice applet to launch a terminal windows in the VM. It is written in C++.
Yet another option is to get GNOME Boxes to support LXD containers. This will be more involved though, since GNOME Boxes currently interfaces with the VM over libvirt only (last checked over a year ago).
Linux offers too many ways to run GUI programs on some other computer/VM/container and get the output on your local X11 session. You can just pick the easiest for you for now, just to get something working.
I have tried to use
tins in a LXD container, that supports nested containers.
$ lxc launch ubuntu:18.04 tins --profile default --profile x11 -c security.nesting=true
Then, got a shell in there.
$ lxc exec tins -- sudo --user ubuntu --login
ubuntu@tins:~$ git clone https://github.com/marbetschar/tins.git
Cloning into 'tins'...
remote: Enumerating objects: 256, done.
remote: Counting objects: 100% (256/256), done.
remote: Compressing objects: 100% (166/166), done.
remote: Total 849 (delta 165), reused 176 (delta 88), pack-reused 593
Receiving objects: 100% (849/849), 820.42 KiB | 2.08 MiB/s, done.
Resolving deltas: 100% (531/531), done.
ubuntu@tins:~$ sudo lxd init
ubuntu@tins:~$ sudo apt install build-essential valac libjson-glib-dev libgtk-3-dev libgranite-dev desktop-file-utils
ubuntu@tins:~$ cd tins/
The above instructions have two issues,
ubuntu user may not be a member of the
lxd group, so add them manually.
- The PulseAudio socket location is hard-coded, so the container will fail to start. The code should look for
PULSE_SERVER, if it exists, and use that location instead of the default.
By having a reproducible environment, it should be easier to develop.
It is great work and I love reading this thread.