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?



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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.