You are not logged in.

#1 2019-06-28 20:23:53

y0k0
Member
Registered: 2019-06-28
Posts: 1

GUI app in LXD container

Hi,

I'm looking for help because I'm trying to make gui app working inside of LXD containers.

Before end up here, I have searched for help on linux-containers forum but even with the aid of someone (using ubuntu), we failed make it working.
Each time I have the error "no protocol specified Can't open display :0"

Even following https://gist.github.com/stueja/447bd3bc … f1ef58ad75 which is for arch user, clear and straightforward.
I still get the same error.

Do you have an idea? encountered that same error?

Thanks to all !

Offline

#2 2019-07-07 09:42:53

Overkill
Member
From: Germany
Registered: 2013-07-16
Posts: 3

Re: GUI app in LXD container

Yeah, I battled a whole day with the same issue...
In the end it started to work after I turned off the xserver's access control list via "xhost +" (on the host of course, this has security implications).

Be aware that /tmp/.X11-unix/X0 might be overshadowed (in the container) by the mounted tmpfs on /tmp (Ensure that /tmp/.X11-unix/X0 exists).
If this is the case, try unmounting /tmp and ensure that /tmp/.X11-unix/X0 does exist and has the right permissions (of your user) and not nobody:nobody.
Furthermore, ensure that $DISPLAY is :0.

Mounting my user's .Xauthority inside the container unfortunately didn't help.
That should make "xhost ..." unnecessary, at least in theory. I still have to take a deeper dive into access control/security regarding X.

Edit: Using Ubuntu as gui container works immediately without problems.

Last edited by Overkill (2019-07-07 11:31:06)

Offline

Board footer

Powered by FluxBB