Skip to content
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

Create window failing #94

Closed
smitesh-sutaria opened this issue Sep 2, 2020 · 5 comments · Fixed by #111
Closed

Create window failing #94

smitesh-sutaria opened this issue Sep 2, 2020 · 5 comments · Fixed by #111

Comments

@smitesh-sutaria
Copy link

Hello,

When i try to run the notepad application, i get the below error :

wine /home/wineuser/.wine/drive_c/windows/syswow64/notepad.exe
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.

@scottyhardy
Copy link
Owner

Hi @smitesh-sutaria, I have no issues when testing so I’ll need some more info. What OS are you running this on and what was the actual command you used to start the container?

@ssb22
Copy link
Contributor

ssb22 commented Jun 29, 2021

I don't know about @smitesh-sutaria but I have the same issue in macOS 11.4 (Big Sur) running on an Intel MacBook (2019), docker-wine wine notepad gives:

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
0010:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
0010:err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
0010:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
0010:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
0010:err:ole:get_local_server_stream Failed: 80004002
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.

Running docker-wine by itself to get the shell, and then running xrandr, gives the error Can't open display host.docker.internal:0

I installed xterm from MacPorts and verified that running xterm outside of Docker does pop up an xterm, so I know XQuartz itself is working.

@ssb22
Copy link
Contributor

ssb22 commented Jun 29, 2021

Works for me if I do:

  1. XQuartz / Preferences / Security / Allow connections from network clients: Yes
  2. quit and restart XQuartz
  3. run docker-wine wine notepad

Steps 1 and 2 should have been done by docker-wine's configure_xquartz function; I'm not sure why it didn't take effect on my system. Perhaps this could be mentioned in a Troubleshooting section of the documentation or something.

@ssb22
Copy link
Contributor

ssb22 commented Jun 29, 2021

Ah I see what's happening: the defaults reads and writes to org.macosforge.xquartz.X11 are not working with XQuartz 2.8.1 (2021) because the name macosforge has been dropped and it should now go to org.xquartz.X11 instead, as shown by the existence of the file ~/Library/Preferences/org.xquartz.X11.plist

@ssb22
Copy link
Contributor

ssb22 commented Jun 29, 2021

It's possible that xquartz will need to have been run at least once for the preferences file to appear, so I'm not sure if my pull request would fix the problem 100% of the time (in particular if this is the first ever time the user has run XQuartz on a brand-new machine). Other strategies would be:

  1. write to both org.xquartz.X11 and org.macosforge.xquartz.X11 (this is probably the easiest and most robust approach),
  2. try to actually run XQuartz before checking which preferences file it creates,
  3. find out some other method of figuring out which XQuartz version is on the system.

@scottyhardy scottyhardy linked a pull request Jul 6, 2021 that will close this issue
scottyhardy added a commit that referenced this issue Jul 6, 2021
Check for non-macosforge XQuartz (fixes #94)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants