Skip to content

x11docker on MS Windows

mviereck edited this page Jun 7, 2019 · 37 revisions

x11docker on MS Windows

x11docker can run natively on MS Windows electively in one of:

Although it basically works, x11docker misses some features available on Linux and cannot be guaranteed to be as reliable as on Linux. However, running in a Linux VM instead of running natively on Windows is fully supported.

Installation

To install x11docker in one of MSYS2, Cygwin or WSL follow the general installation instructions.

  • Note: The described "shortest way" fails with latest x11docker release for WSL with sudo. Try instead:
curl -fsSL https://raw.githubusercontent.com/mviereck/x11docker/master/x11docker | sudo bash -s -- --update-master

Note: Upcoming x11docker release v6.0.0 (currently in master branch) will depend on runx to run in WSL or MSYS2. Compare ticket #165. Run e.g.

runx -- x11docker x11docker/check

X server

x11docker needs an X server on MS Windows.

  • Install X server VcXsrv on Windows into C:/Program Files/VcXsrv.
    • Allows x11docker option --vcxsrv. x11docker will autodetect it.
  • Alternative for Cygwin users: X server Xwin. Install packages xinit and xwininfo in Cygwin.
    • Allows x11docker option --xwin. x11docker will autodetect it.
    • Note that Xwin provides a better GPU support with option --gpu than VcXsrv.

GPU

Hardware acceleration with option --gpu is basically possible.

  • GPU support works best with Xwin in Cygwin (option --xwin). NVIDIA cards are supported, too.
  • GPU supports works with VcXsrv (option --vcxsrv) for Intel and AMD GPUs, but not for NVIDIA GPUs. (VcXsrv bug ticket)
  • You can run some GPU checks with x11docker --gpu x11docker/check.

Compare this X server/GPU check table for current experience.

Constraints

Not all x11docker options are implemented on MS Windows. E. g. --webcam, --pulseaudio and --printer do not work.

Troubleshooting

  • There seems to be an issue with X cookie authentication with VcXsrv. Compare #160. As a workaround you can run with disabled authentication using option --no-auth. However, that is less secure and is not a solution. Please report in the bug ticket if your system is affected, too.
  • There seems to be an issue with --pulseaudio. Compare #161.
  • If running in Powershell fails, compare #157.
  • To fix possible error message Error response from daemon: error while creating mount source path: mkdir /host_mnt/c: file exists. have a look at issue ticket #104.
  • Error messages like ./x11docker: line 2: $'\r': command not found indicate a wrong line ending conversion from git. Run dos2unix x11docker one time to fix it.
  • Firewall settings in Windows can cause issues for container applications accessing the X server. If everything starts up without an obvious error, but no application window appears, have a look at issue ticket #108. Firewall
Clone this wiki locally