-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker-for-win: cygwin/x not working, possible wrong DISPLAY #120
Comments
The log shows that already
Edit: I just see that you still set |
I removed |
Maybe it is a firewall issue again? However, this time we get an error message, not an infinite delay on hold. |
You nailed it! I wast jut coming to report it. Bloody firewall... It stupidly sets two rules... So, this issue is legit. The DISPLAY envvar is not properly set inside the container. When I exec from MSYS and set x11docker --gpu --user=root --cap-default -- -p "8080:8080" -- x11docker/xpra sh -c "apk add xterm && DISPLAY=10.0.75.1:100 xterm" |
$ ./x11docker --xwin --no-auth --exe xterm
x11docker note: Failed to check for sshd. ps -p not supported.
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Windows firewall settings can forbid application access
to the X server. If no application window appears, but no obvious error
is shown, please check your firewall settings. Compare issue #108 on github.
x11docker WARNING: Option --no-auth: SECURITY RISK!
Allowing access to X server for everyone.
:100 runs without cookie authentication..75.1
:100m: Xt error: Can't open display: 10.0.75.1
x11docker WARNING: Application 'xterm ' terminated fast
or failed at all, or the process forked itself and cannot be supervised.
Last lines of application output:
==> /cygdrive/c/Users/eine/x11docker/cache/xterm-e8260deaef1e6d799bb6b32a22b9f370/share/stdout <==
==> /cygdrive/c/Users/eine/x11docker/cache/xterm-e8260deaef1e6d799bb6b32a22b9f370/share/stderr <==
:100m: Xt error: Can't open display: 10.0.75.1 |
If there was a firewall issue, could you add some info in #108 concerning Xwin?
This looks like a DOS/UNIX newline issue. The :100 appears at the wrong place. I've made an update that converts the newline in the IP check. Please try out. However, it is odd that the issue did not appear in MSYS2 as well. |
I git fetched and pulled from MSYS: # git pull
Updating 6094dda..3ac61a5
Fast-forward
x11docker | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-) If I try to execute it in Cygwin: $ ./x11docker --xwin --no-auth --exe xterm
./x11docker: line 2: $'\r': command not found
./x11docker: line 13: $'\r': command not found
./x11docker: line 15: $'\r': command not found
./x11docker: line 356: $':\r': command not found
./x11docker: line 357: $'}\r': command not found
./x11docker: line 358: syntax error near unexpected token `}'
'/x11docker: line 358: ` } || { So I executed $ dos2unix x11docker
dos2unix: converting file x11docker to Unix format... No xterm (local) works: $ ./x11docker --xwin --no-auth --exe xterm
x11docker note: Failed to check for sshd. ps -p not supported.
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Windows firewall settings can forbid application access
to the X server. If no application window appears, but no obvious error
is shown, please check your firewall settings. Compare issue #108 on github.
x11docker WARNING: Option --no-auth: SECURITY RISK!
Allowing access to X server for everyone.
x11docker WARNING: --xwin: X server 10.0.75.1:100 runs without cookie authentication.
xterm: cannot load font "-Misc-Fixed-bold-R-*-*-13-120-75-75-C-120-ISO10646-1" It seems to be fixed, indeed.
I got the $ ./x11docker --vcxsrv --gpu --user=root --cap-default -- -p "8080:8080" -- x11docker/xpra sh -c "apk add xterm && xterm"
...
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/3) Installing libxpm (3.5.12-r0)
(2/3) Installing libxaw (1.0.13-r2)
(3/3) Installing xterm (337-r0)
Executing busybox-1.29.3-r10.trigger
OK: 422 MiB in 214 packages
Invalid MIT-MAGIC-COOKIE-1 keyWarning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm: Xt error: Can't open display: %s
$ ./x11docker --vcxsrv --gpu --user=root --cap-default -- -p "8080:8080" -- x11docker/xpra sh -c "apk add xterm && xterm"
...
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/3) Installing libxpm (3.5.12-r0)
(2/3) Installing libxaw (1.0.13-r2)
(3/3) Installing xterm (337-r0)
Executing busybox-1.29.3-r10.trigger
OK: 422 MiB in 214 packages This seems to be solved, so I'm closing it. Thanks for the quick fix! |
I tried to execute
x11docker --gpu --user=root --cap-default -- -p "8080:8080" -- x11docker/xpra sh -c "apk add xterm && xterm"
in cygwin, but it failed:x11docker_xwin.log
Since I cannot use
--interactive
in cygwin, I started a container:and I opened a terminal from MSYS2 (where
winpty
is available):DISPLAY should be
10.0.75.1:100
, as reported inxdocker.log
. If I set it and start xterm, it does not complain, but nothing is shown:x11docker_xwin2.log
EDIT
I forgot to mention that the X server is properly started (
100.0
).The text was updated successfully, but these errors were encountered: