How can I x11 forward from docker to the host inside a virtual machine then to the localhost

0

Here is the scenario

program (inside container) -> virtual machine -> localhost

I'm using a mac os as a host and boot up a virtual machine using virtual box. Inside virtual box, I boot up a container containing a program with GUI. Is there a way to do X11 forwarding to my mac os host?

Thanks!

zack

Posted 2018-08-08T22:57:43.163

Reputation: 111

Answers

0

Using DISPLAY environment variable should be enough to go from container -> VM.

Then on the VM use socat to listen on the TCP and connect to the X11 unix socket (/tmp/.X11-unix/X0 ) or abstract unix socket (@/tmp/.X11-unix/X0).

Alternate to socat, use xhost +{container} and configure Xorg on the VM to listen to a network address.

danblack

Posted 2018-08-08T22:57:43.163

Reputation: 190