x11docker: docker-for-win: --vcxsrv: X cookie authentication fails
Coming from https://github.com/mviereck/x11docker/issues/145#issuecomment-493565778
@1138-4EB wrote:
When I don’t use it (x11docker --verbose x11docker/check), the following error is shown:
LoadPreferences: C:\msys64\home\eine\.XWinrc not found
LoadPreferences: Loading C:\Program Files\VcXsrv\system.XWinrc
Warning: Locale not supported by X, falling back to 'C' locale.
(II) IGLX: Loaded and initialized swrast
(II) GLX: Initialized DRISWRAST GL provider for screen 0
/c/Users/eine/x11docker/cache/x11docker-check-c01f93/xinitrc: line 107: xsetroot: command not found
-rw-r--r-- 1 eine None 0 May 17 04:47 /c/Users/eine/x11docker/cache/x11docker-check-c01f93/share/Xclientcookie
Failed to retrieve trusted cookie from X server. Will bake one myself.
Ignoring locks on authority file Xclientcookie
Ignoring locks and writing authority file Xclientcookie
-rw-r--r-- 1 eine None 230 May 17 04:47 /c/Users/eine/x11docker/cache/x11docker-check-c01f93/share/Xclientcookie
C:\Program Files\VcXsrv\xauth.exe: (argv):1: unable to read any entries from file "(stdin)"
Ignoring locks on authority file Xclientcookie
==> /c/Users/eine/x11docker/cache/x11docker-check-c01f93/message.log <==
x11docker[258.42]: Waiting since 1s for --vcxsrv to be ready.
I think that unable to read any entries from file “(stdin)” might be familiar to you.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (20 by maintainers)
Commits related to this issue
- --vcxsrv: Depend on xauth.exe in Cygwin/X #160 — committed to mviereck/x11docker by mviereck 5 years ago
- --xwin: support in MSYS2, maybe WSL, too. Will be dropped again. #148 #160 — committed to mviereck/x11docker by mviereck 5 years ago
Thank you for your thoughts. You have said some important points to consider.
As a start, I have published runx v0.1. It allows to provide VcXsrv in WSL. It can be sourced in
~/.bashrcor directly run e.g.runx xterm. I might extend it for MSYS2 and Cygwin, too.It can also be used for x11docker in future. This will allow me to drop some Windows code from x11docker.
I want to support x11docker in at least WSL.
runxmight make it easier to keep support for Cygwin and MSYS2, too.I must agree with you on almost everything. They also did bad lobbywork around here for several years, and they are still doing it, specially targeting education. I am aware about the case of Munich too. It was such a sad new.
I think that this might be incoherent. Although I would prefer having Cygwin support rather than not having support at all, I think that it is not consistent to support Cygwin and not WSL. Both are solutions to use GNU/Linux tools on Microsoft’s Windows. Both of them rely on some free, other open, and other closed source pieces of software. The difference between them is mostly technological. I.e., if someone was to write a HyperV-based Cygwin today, the architecture would probably look quite similar to WSL.
Moreover, both installing and using Cygwin is harder than either WSL or GNU/Linux. A common GUI user which needs to start using terminal apps might be confused about WSL being much easier, and it might lead to thinking that Microsoft’s Linux is easier than a regular GNU/Linux. I think that, from a strategic point of view, it is better to let new users mix windows and linux binaries almost seamlessly. Hopefully, at one point they will be using all linux binaries without even realizing about it.
I think that x11docker can signifficantly help in this sense. According to the demos, it will be possible to launch a windows GUI app from WSL. So, users might feel that Linux is not for regular apps, because GUIs only work on windows. A simple script (which calls x11docker, or an independent one) sourced in
.bashrccan solve this, as you say. A very interesting user group that might benefit from this are developers of apps with GUIs (including videogames) which use frameworks with multi-platform support.I also think that the Windows part of the codebase is getting too complex, so I agree with you when you point out that in a few months a single and straighforward solution should be kept.
At the same time, the main reason for me to switch from my own script to x11docker was Windows support. On GNU/Linux, it is straighforward to share the X server on the host with any docker container. Hence, it is easy to set up, even by hand. However, on Windows it is not so easy. Therefore, if Windows support was dropped, I would probably need to stick with the current version. For me, it is prioritary to have a common syntax on both platforms, because it allows me to write all the scripts and development assets once. I could wrap x11docker with my own ‘entrypoint’, which I did in the past; but this would imply that I would not use any x11docker feature which I am not able to replicate on Windows on my own.
In the end, it is going to be mostly your time and effort, so I completely understand if you do not want to support Microsoft at all, be it because you are angry or because of any other reason.
Yes. Tools like
xauthorxwininfocan be installed in WSL with e.g.apt-get install xauth. x11docker could declare this as a dependency like on a regular Linux system and can use them directly withoutcmd.exeworkarounds or path conversions and carriage return issues. It also provides a bettermkfifosupport than Cygwin and MSYS, an issue we had in the early x11docker-on-Windows days and is currently fixed with an ugly and time+CPU consuming workaround.Things would also become easier if x11docker supports Cygwin/X only, but I assume WSL(2) will supersede it in future.
AFAIK docker will run directly on the WSL2-Linux-Kernel. It is not possible in WSL1 due to missing kernel features (cgroups). There will be no need for the current Docker-VM setup. That might also fix odd bugs like #104.
There has been some requests in the WSL Github tracker, e.g. https://github.com/microsoft/WSL/issues/2356. It seems to be out of scope currently, but who knows. Either way, if with VcXsrv or a built-in X, x11docker will be able to provide it to container applications.