docker-wine
docker-wine copied to clipboard
Application tried to create a window, but no driver could be loaded
Describe the bug
I am trying to start the container using the example, notepad, but x11 does no seem to be connecting or forwarding.
To Reproduce
run sudo ./docker-wine wine notepad
Expected behavior A notepad window should open
Desktop (please complete the following information):
- OS: Debian 11
$ ./sudo docker-wine wine notepad
stable-5.0.1-20201203: Pulling from scottyhardy/docker-wine
Digest: sha256:580121f5096660c0d699768be51109bdc4d69377794619bae5f3c6247ad1b72e
Status: Image is up to date for scottyhardy/docker-wine:stable-5.0.1-20201203
docker.io/scottyhardy/docker-wine:stable-5.0.1-20201203
0009:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0009:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
I am running gnome 3.x with XWayland:
dab 3728 3591 0 Oct07 ? 00:07:12 /usr/bin/Xwayland :0 -rootless -noreset -accessx -core -auth /run/user/1000/.mutter-Xwaylandauth.6ZUNA1 -listen 4 -listen 5 -displayfd 6 -listen 7
When I ran wine outside of the container, i was able to see some windows, but i had other issues so I sought out this container.
Inside the container:
$ echo $DISPLAY
:0
I think this is mostlly to do with wayland and im trying to figure out how to enable forwarding with this. it looks like it's got something to do with $XAUTHORITY and $WAYLAND_DISPLAY.
There is a project https://github.com/mviereck/x11docker that looks like it may have solved this but may be too complex to work directly with this container.
I was attempting to fix this and found that adding this line solves one problem and gets to the next: https://github.com/scottyhardy/docker-wine/pull/118
Now it says it doesn't have write access:
$ sudo ./docker-wine wine notepad
stable-5.0.1-20201203: Pulling from scottyhardy/docker-wine
Digest: sha256:580121f5096660c0d699768be51109bdc4d69377794619bae5f3c6247ad1b72e
Status: Image is up to date for scottyhardy/docker-wine:stable-5.0.1-20201203
docker.io/scottyhardy/docker-wine:stable-5.0.1-20201203
wineserver: mkdir /tmp/.wine-1010: Permission denied
This prompted me to run with --as-root, which worked. But then I removed the line in this PR and it also worked as root. This leads me to believe that maybe the original problem was only to do with permissions.
ran into this issue on osx. ran the following to resolve it:
xhost + 127.0.0.1
EDIT: ah, and i had to run with the flag ./docker-wine --as-root as well