Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tins: How to start a Desktop Environment from a Container? #16

Open
marbetschar opened this issue May 13, 2020 · 2 comments
Open

Tins: How to start a Desktop Environment from a Container? #16

marbetschar opened this issue May 13, 2020 · 2 comments

Comments

@marbetschar
Copy link

Hi @AlexandreDey 👋

Just came across your graphical container project while working on mine - seems like we had the same idea ;)

I put together a graphical frontend for LXD (named "Tins"), but I'm stuck trying to figure out how to forward a full desktop environment to Xephyr (or similar). Any chance you can point me towards the right direction?

Using LXD v3.0.3 on elementary OS 5.1 Hera (Ubuntu 18.04 LTS) with the following profile:
https://github.com/marbetschar/tins/blob/master/data/lxd/profile-x11.json

As mentioned there, if I start a regular X11 application it appears in the Xephyr window (for example firefox) - but sudo systemctl restart gdm or sudo systemctl stop gdm && sudo gdm seems to do nothing.

Would highly appreciate it, if you can put together a rought concept of the minimal steps need to be taken to get this working - I already glimpsed at your code, but its quite a lot :)

@marbetschar marbetschar changed the title How to start a Desktop Environment from a Container? Tins: How to start a Desktop Environment from a Container? May 13, 2020
@AlexandreDey
Copy link
Owner

Hi, when using a passed through Xorg server in the container, you have to instruct the display manager to use it instead of trying to spawn a new one (it doesn't have the necesary permissions to do so).
AFAIK gdm does not propose such a feature, but lightdm does (example https://github.com/AlexandreDey/ContainerBox/blob/master/etc/creator/resources/10_container_box.conf).

Another possibility would be to make the display rendering manager compatible with user namespaces or create a virtual GPU and screen abstraction for the container

@marbetschar
Copy link
Author

@AlexandreDey thank you so much for this insight regarding lightdm. And your work helps tremendously!! I achieved a very rough, first working solution using Xephyr - thanks to the code in your repo 🎉️

I'm wondering: In your experience, which pass through solution works best? Is it Xephyr, xpra, ...?

The only reason I used Xephyr is because it was already preinstalled on my Ubuntu 18.04 LTS. Since I'm primarily targeting Tins to elementary OS users as first step, I'm bound to Ubuntu 18.04 and in a few months Ubuntu 20.04.

Thanks again!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants