Giter Club home page Giter Club logo

Comments (8)

rythorpe avatar rythorpe commented on June 11, 2024

This looks like an x-forwarding issue. Have you ever encountered this @ntolley?

from hnn.

ntolley avatar ntolley commented on June 11, 2024

@oldgandalf as suggested above, you likely need to enable x-forwarding:
image

Unfortunately this needs to be done every time you restart your computer (unless you automate the program on startup), one of the downsides of using WSL but it is rather useful in every other sense.

Let me know if you already tried this and I can see if I can reproduce the error another way.

from hnn.

oldgandalf avatar oldgandalf commented on June 11, 2024

Hello @rythorpe and @ntolley. Thanks for your comments.
I had already installed the VcXsrv and launched it. The X is in my right bottom corner.
I have restarted Ubuntu and the computer, but still the same error.
I installed the Ubuntu including the Ubuntu 18.04 in the WSL installation line: using the option WSL "Ubuntu 18.04" (something like this). Do you think it may be an issue?

from hnn.

oldgandalf avatar oldgandalf commented on June 11, 2024

I have these two icons in my applications
image

I first installed WSL alone and then again including the Ubuntu 18.04 option.
What I am doing is to launch the Ubuntu 18.04 LTS icon and then HNN call:

export DISPLAY=:0 # WSL 1
cd hnn_source_code
python3 hnn.py

from hnn.

rythorpe avatar rythorpe commented on June 11, 2024

Have you gotten any firewall pop ups @oldgandalf? I wonder if there was a recent update somewhere on the windows or ubuntu side that is preventing communication between your WSL environment and your x-client.

from hnn.

oldgandalf avatar oldgandalf commented on June 11, 2024

Hi @rythorpe, No, not any firewall pop-ups. Windows is always installing updates. But just the normal ones. I just installed Ubuntu for this purpose, so I have not tested this Ubuntu installation. Is there a way to test that? Also, is Ok the way I used to install Ubuntu, as an option in the WSL?
Do you recommend I install Ubuntu using a virtual machine as VMWare and forget about WSL?
Thanks

from hnn.

ntolley avatar ntolley commented on June 11, 2024

Admittedly I'm a bit stumped, can you try launching a GUI app buy typing firefox into the terminal (you may need to install it). That will at least tell us if this is an HNN issue, or an X11 issue.

Do you recommend I install Ubuntu using a virtual machine as VMWare and forget about WSL?

In the short term this should work fine. Another option is to try WSL2:
https://dev.to/adityakanekar/upgrading-from-wsl1-to-wsl2-1fl9

You can automate the export of DISPLAY by following the instructions here: https://stackoverflow.com/questions/61110603/how-to-set-up-working-x11-forwarding-on-wsl2

Definitely let us know what you decide!

from hnn.

oldgandalf avatar oldgandalf commented on June 11, 2024

@ntolley Thank you very much for your hewlp.
I made the test with firefox and it did not work either.

jbosch@DESKTOP-CGD5VDN:~/hnn_source_code/hnn_source_code$ firefox
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :0

So, I think the problem is deeper. I will try to use the WSL2 or install a VMWare virtual machine.

from hnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.