-
Notifications
You must be signed in to change notification settings - Fork 410
x11docker on MS Windows
x11docker can run natively on MS Windows electively in one of:
-
WSL (Windows subsystem for Linux)
- In WSL2 x11docker defaults to use a native Docker installation within WSL2. To use the Docker-for-win MobyVM instead, add option
--mobyvm. -
WSL2gprovides an X server on its own. There you can use nested X servers like e.g.Xepyhr. If available,WSLgis the most recommend environment to run x11docker on MS Windows.
- In WSL2 x11docker defaults to use a native Docker installation within WSL2. To use the Docker-for-win MobyVM instead, add option
- Cygwin
- MSYS2
x11docker on MS Windows provides basic functionality, but misses some features available on Linux. For example, options --webcam, --pulseaudio and --printer do not work. However, running in a Linux VM instead of running directly on MS Windows is fully supported.
- To install x11docker in one of MSYS2, Cygwin or WSL follow the general installation instructions.
- In WSL please install
ipcalc. - In Cygwin and MSYS2 please install package
procps.
- In WSL please install
- Provide an X server to allow graphical Linux applications.
x11docker needs an X server on MS Windows.
-
WSLgprovides an X server on its own. There you can additionally use nested X servers likeXephyror simply option--hostdisplay. - Older WSL and WSL 2, and Cygwin or MSYS2 need XWin from Cygwin/X or VcXsrv.
- In Cygwin it is enough to install packages
xinit,xauth,xwininfoandxhostusing the Cygwin installer. That provides X server XWin. - In WSL and WSL2 you need to install
runx,xauthandxhostto provide X server VcXsrv or XWin. - In MSYS2 you need to install
runxto provide X server VcXsrv.- In MSYS2 only X server VcXsrv is supported by
runx. XWin is not supported in MSYS2. - Usage in MSYS2 is discouraged because X server access can not be restricted with an authentication cookie.
- In MSYS2 only X server VcXsrv is supported by
-
Docker might be configured not to allow sharing files from drive
C:or other Windows partitions.- Change docker settings to allow access to drive
C:(or another partition specified with--cachebasediror--homebasedir).- x11docker creates cache files on drive
C:that it shares with the container. You can specify another cache path with e.g.--cachebasedir=D:/x11docker/cache. - Same issue might occur with option
--home. You can specify another home base folder with e.g.--homebasedir=D:/x11docker/home.
- x11docker creates cache files on drive
- Change docker settings to allow access to drive
-
Firewall settings in Windows can cause issues for container applications accessing X servers
XwinorVcxsrv. If everything starts up without an obvious error, but no application window appears, have a look at ticket #108.
-
Sometimes docker fails to start with an error message that it tries to create a shared folder that already exists on host:
Error response from daemon: error while creating mount source path: mkdir /host_mnt/c: file exists.It is a bug of Docker or MS Windows. x11docker cannot do anything about it. Bug reports and workarounds here: https://github.com/docker/for-win/issues/1560 . One promising workaround seems to go into Docker settings and do "Reset credentials" under "Shared Drives", than restart Docker.
-
Error messages like
./x11docker: line 2: $'\r': command not foundindicate a wrong line ending conversion from git. Rundos2unix x11dockeronce to fix it.
