Skip to content

Latest commit

 

History

History
 
 

X11

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Running Graphics Programs from Docker

Windows

Install either Xming or VcXsrv.

Once installed run XLaunch

  1. Select Multiple Windows

XLaunch Multiple Windows

  1. Set Display to 0

XLaunch Display 0

  1. Select Start no client

XLaunch Start no client

  1. Check Disable Access Control

XLaunch Display access control

  1. Finish

Testing a Graphical Program

First get your IPv4 address:

Windows:

ipconfig

Under the Ethernet adapter vEthernet (WSL): header there should be a line containing IPv4 Address.

Linux:

ip route

The first line should contain the IP address.

In the terminal run:

docker build -f Dockerfile.xeyes . -t xeyes
docker run --rm --name xeyes -e DISPLAY=<your_IPv4_address>:0.0 xeyes:latest

Or use a pre-built image: https://hub.docker.com/r/openiss/openiss-xeyes

docker run --rm --name xeyes -e DISPLAY=<your_IPv4_address>:0.0 openiss/openiss-xeyes:F22-01

xeyes

If you see the xeyes program appear, that means graphics are working. (The xeyes example is not technically OpenGL, but more so X11 but allows for a quick test of graphical display from Linux to Windows).