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

when network adapter is down, it does not work #8

Open
aprossi opened this issue Sep 27, 2018 · 2 comments
Open

when network adapter is down, it does not work #8

aprossi opened this issue Sep 27, 2018 · 2 comments
Assignees

Comments

@aprossi
Copy link

aprossi commented Sep 27, 2018

dockeri works ok with existing containers while the host is connected to the network. Turning off wi-fi causes an error, e.g. (on a mac)

Fatal: QXcbConnection: Could not connect to display :0
@chbrandt
Copy link
Member

Indeed, thanks for pointing that out.

X11 communication between the container and host routes through TCP sockets. Although I have tried to make use of unix sockets, as of today, they are not (completely) supported my docker on mac (docker-for-mac/osxfs).

In this scenario, X11 bind between container and host (dockeri and Xorg/XQuartz) need an alive network interface; we need an IP address to where the docker-machine will route X11 data.

What happens when we shut down the wi-fi interface is the loss of the IP/interface that dockeri had chosen to use for X11 routing.

One alternative I have in mind is to create a virtual network interface, associate a dummy IP to it (e.g, 198.168.1.1) and bind the X11/DISPLAY to it. In theory, this interface would never go down.

@chbrandt chbrandt self-assigned this Oct 20, 2018
@chbrandt
Copy link
Member

OK. I put some more reading on the subject. I will digest that in the next days, but I'll leave it here for the records and...a second reading soon.

First, a long discussion on the subject "unix sockets on MacOS & Docker", since unix sockets would be right (at least the most elegant) solution to the issue:

On the network side, besides the Docker network docs, there is this nice review from Mesosphere:

Regarding unix sockets -- in particular using it for X forwarding -- there are lots of posts out there about doing it on Linux; no secrets, but it is worth list some good ones:

And the link for Socat, which seems to be coming back to the scene:

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