-
Notifications
You must be signed in to change notification settings - Fork 379
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
--runx option for MS Windows #219
Comments
I'll try to test it during the weekend. Meanwhile, I'm not sure I understand the feature. Did you roll-back and |
|
I needed a couple of weekends, but I'm ready to test this now. Unfortunately, the "old" syntax fails: # /t/runx/runx --no-auth -- /t/x11docker/x11docker x11docker/xfce xfce4-terminal
runx note: Using random X display number :2738.
If this display number is already in use, X server startup will fail.
You can specify a display number N with option '--display N'.
runx 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: https://github.com/mviereck/x11docker/issues/108
runx WARNING: Option --no-auth: Cookie authentication is disabled!
SECURITY RISC!
Your X server vcxsrv listens on TCP connections without any protection.
Others could try to access your system through network connections.
Please use option --no-auth for debugging only.
DISPLAY=10.0.75.1:2738
x11docker WARNING: Your host X server runs without cookie authentication.
x11docker note: Using X server option --hostdisplay
x11docker note: Option --hostdisplay: You host X server seems to run
without cookie authentication. Cannot set up a cookie for X access.
Fallback: Enabling option --no-auth.
x11docker note: check_screensize(): Could not determine your screen size.
Please improve this by installing one of xrandr, xdpyinfo or xwininfo.
Or use option --size=XxY.
You can look for the package name of this command at:
https://github.com/mviereck/x11docker/wiki/dependencies#table-of-all-packages
x11docker WARNING: Option --no-auth: SECURITY RISK!
Allowing access to new X server for everyone.
Your X server is accessable over TCP network without any restriction.
That can be abused to take control over your system.
x11docker WARNING: --hostdisplay: X server 10.0.75.1:2738 runs without cookie authentication.
x11docker ERROR: Startup of docker failed. Did not receive a container ID.
Last lines of container log:
esourcein\docker.exe: Error response from daemon: file does not exist.
esourcein\docker.exe run --help'.er
Type 'x11docker --help' for usage information
Debug options: '--verbose' (full log) or '--debug' (log excerpt).
Logfile will be: /home/eine/.cache/x11docker/x11docker.log
Please report issues at https://github.com/mviereck/x11docker Is this expected? Then, I added ...
Providing an X server in background all the time:
- Create an entry in ~/.bashrc: source /usr/local/bin/runx
- In future terminal session you can directly run GUI commands.
E.g. just type: 'pcmanfm' instead of 'runx -- pcmanfm'.
runx version v0.3.0
Please report issues and get help at: https://github.com/mviereck/runx
runx note: Command not found: xauth
runx ERROR: Missing dependency: xauth
Cannot create an authorization cookie for X server access.
MSYS2 does not provide xauth. Rather use Cygwin or WSL instead.
You can disable cookie authentication with discouraged option --no-auth. Last, I tried x11docker note: Enabled X over TCP instead of sharing unix socket.
x11docker WARNING: Option --no-auth: SECURITY RISK!
Allowing access to new X server for everyone.
Your X server is accessable over TCP network without any restriction.
That can be abused to take control over your system.
x11docker ERROR: Startup of docker failed. Did not receive a container ID.
Last lines of container log:
esourcein\docker.exe: Error response from daemon: file does not exist.
esourcein\docker.exe run --help'.er
Type 'x11docker --help' for usage information
Debug options: '--verbose' (full log) or '--debug' (log excerpt).
Logfile will be: /home/eine/.cache/x11docker/x11docker.log
Please report issues at https://github.com/mviereck/x11docker I feel that this might be the same issue as with the "old syntax" above. In case it might be relevant, I updated docker-for-win to 2.2.0.3 (stable). However, I think that the location of binaries didn't change. Anyway, this is the log: x11docker.log |
Thank you for the test!
The message is messed up with DOS newlines. Not sure why, x11docker removes the in function
It does not say which file is missing. The Docker command has only one
The Or maybe the issue is here: A bit special I've not seen before:
It might be worth to unset this variable like:
Overall, I am not sure what is going wrong.
Is fixed now. |
I tried both removing L3943-L3945 and unsetting
I'm not sure. On the one hand, I think there was an earlier update which might have broken it too. The one I mentioned is the latest. On the other hand, it seems that runx is correct but the failure is produced by x11docker, isn't it?
I can confirm. |
Errors seem to have changed now: # /t/runx/runx --no-auth -- /t/x11docker/x11docker x11docker/xfce xfce4-terminal
runx note: Using random X display number :104.
If this display number is already in use, X server startup will fail.
You can specify a display number N with option '--display N'.
runx 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: https://github.com/mviereck/x11docker/issues/108
runx WARNING: Option --no-auth: Cookie authentication is disabled!
SECURITY RISC!
Your X server vcxsrv listens on TCP connections without any protection.
Others could try to access your system through network connections.
Please use option --no-auth for debugging only.
DISPLAY=10.0.75.1:104
realpath: Files/Docker/Docker/resources/bin/docker: No such file or directory
x11docker WARNING: Your host X server runs without cookie authentication.
x11docker note: Using X server option --runx
x11docker ERROR: Command 'xauth' not found.
SECURITY RISK!
Your X server would be accessable over network without authentication!
That could be abused to take control over your system.
Please install 'xauth' to allow X cookie authentication.
You can disable cookie authentication with discouraged option --no-auth.
Type 'x11docker --help' for usage information
Debug options: '--verbose' (full log) or '--debug' (log excerpt).
Logfile will be: /home/eine/.cache/x11docker/x11docker.log
Please report issues at https://github.com/mviereck/x11docker # /t/x11docker/x11docker --runx --no-auth x11docker/xfce xfce4-terminal
realpath: Files/Docker/Docker/resources/bin/docker: No such file or directory
x11docker note: Enabled X over TCP instead of sharing unix socket.
x11docker WARNING: Option --no-auth: SECURITY RISK!
Allowing access to new X server for everyone.
Your X server is accessable over TCP network without any restriction.
That can be abused to take control over your system.
x11docker ERROR: Startup of docker failed. Did not receive a container ID.
Last lines of container log:
esourcein\docker.exe: Error response from daemon: file does not exist.
esourcein\docker.exe run --help'.er
Type 'x11docker --help' for usage information
Debug options: '--verbose' (full log) or '--debug' (log excerpt).
Logfile will be: /home/eine/.cache/x11docker/x11docker.log
Please report issues at https://github.com/mviereck/x11docker Note |
Thank you for the test!
A test with an older x11docker version that once worked for you could validate that the failure is introduced with the docker update.
You need
I agree.
Is fixed now. (Introduced in #223). Though, does not affect the Windows setup, does no harm here |
I updated to master and now the logfiles ( With v6.5.0 and v6.4.0 the error is different and the logfile is not empty: x11docker.log x11docker.log v6.3.0 and v6.2.0 start the X server but then seem to hang waiting for something. None of them writes any content to the log. No container is created with any of them. Anyway, I tried /mnt/t/x11docker/x11docker --runx --no-auth x11docker/xfce xfce4-terminal
realpath: '': No such file or directory
'\\wsl$\Debian\home\eine'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Failed to connect to bus: No such file or directory
x11docker note: Enabled X over TCP instead of sharing unix socket.
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.
'\\wsl$\Debian\home\eine'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
x11docker WARNING: Option --no-auth: SECURITY RISK!
Allowing access to new X server for everyone.
Your X server is accessable over TCP network without any restriction.
That can be abused to take control over your system.
(xfce4-terminal:130): dbind-WARNING **: 03:51:11.657: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
/mnt/t/x11docker/x11docker: line 869: 15484 Terminated watchmessagefifo
Maybe I misunderstood #165 (comment) and #165 (comment) ? Or the implementation details changed since then? See also command examples in #165 (comment) |
Odd. Do you get output with All logs that are created down to 6.4.0 show:
Good investigation! So probably something changed in MSYS2. At least one of the older x11docker versions must have worked for you previously. Maybe disabling MSYS2 path mangling at all makes a difference:
I'll also try to avoid the double slash although it should not hurt. I need to look close at the related code again why/where it is generated.
Likely I changed something and can't remember ... the latest master works again with |
No. Actually, with
That directory and file do exist. The error must be produced by some of the arguments (volumes?) passed to docker (run).
Yes, it works in Cygwin.
It seems to make no difference at all. If we could have the log saved to some other location (say |
Let's discuss in a new ticket #225 because this is an MSYS2 related issue, not a As for
In Cygwin:
|
In WSL, the X server is started, but the container fails. The container is automatically removed, but the X server is not. /mnt/t/x11docker/x11docker --runx x11docker/xfce xfce4-terminal
'\\wsl$\Debian\home\eine'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Failed to connect to bus: No such file or directory
x11docker note: Enabled X over TCP instead of sharing unix socket.
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.
'\\wsl$\Debian\home\eine'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Authorization required, but no authorization protocol specified
Unable to init server: Could not connect: Connection refused
(xfce4-terminal:119): Gtk-WARNING **: 11:53:01.916: cannot open display: 10.0.75.1:2645
/mnt/t/x11docker/x11docker: line 869: 19157 Terminated watchmessagefifo There is no logfile in In Cygwin, everything works as expected, and a non-empty logfile is generated. |
runx should terminate after x11docker terminates. Could you check with a host application, too? E.g.
The transmission of the cookie seems to fail. Surprisingly it works in Cygwin. Could you please run with
With MobyVM x11docker creates the cache in your Windows home, something like Storing the cache outside of WSL is a workaround for easier/safer sharing of files with MobyVM. |
With a host application, it works. It didn't at first, but I then executed it 4-5 times and it worked as expected. However,
In understand why is it. However, is it documented elsewhere? I tried to look at
|
I found the issue in the log: x11docker has overwritten
It makes sense to run
x11docker now creates a text file in cache to explain this:
The log file is copied to
I've adjusted the message to appear only for the combination WSL+MobyVM. |
@eine Could you please run a new test in WSL if you find some time?
|
I pulled latest x11docker and runx, and it does not work: /mnt/t/x11docker/x11docker --runx x11docker/xfce xfce4-terminal
Failed to connect to bus: No such file or directory
x11docker note: Enabled X over TCP instead of sharing unix socket.
x11docker note: With MobyVM and WSL x11docker stores its cache files on drive C:
to allow cache file sharing.
Your Docker setup might 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.
Authorization required, but no authorization protocol specified
Unable to init server: Could not connect: Connection refused
(xfce4-terminal:119): Gtk-WARNING **: 17:42:56.318: cannot open display: 10.0.75.1:1844
/mnt/t/x11docker/x11docker: line 874: 3047 Terminated watchmessagefifo
/mnt/t/x11docker/x11docker: line 637: ::: command not found |
Thank you for the test! |
It seems to work now!
However:
|
Great! I'll publish release
Fixed: Has been
I have no idea why this happens. Does it happen, too, if you run |
I can confirm.
Yes, it happens if I run |
runx and x11docker use some escape codes for colored output. Maybe that causes the font changes on MS Windows? However, than it should happen with both of them. You could try:
|
Closing here because the core issues and tests of option |
I've added an experimental option
--runx
in 93c385d@eine Could you please try this out? My Windows VM currently does not work at all, so I cannot check myself.
Option
--runx
allows you to run x11docker directely instead of the previousrunx -- x11docker
.Especially a check is needed in Cygwin and WSL if the XAUTHORITY cookie works.
In MSYS2 you would run
x11docker --runx --no-auth
.You can run x11docker without specifying
--runx
, x11docker will automatically choose--runx
or--xwin
.The text was updated successfully, but these errors were encountered: