I think WSL 1 and WSL 2 are quite different and it's likely that with WSL 1 local host would work as I think it uses the same network stack, unlike WSL 2 which is more like a mini virtual machine.
Good that it works for you, not sure how useful that setup is though :) I was surprised that gnubg ran in a gui window via WSL. Jon On Wed, 3 Sept 2025 at 09:44, Øystein Schønning-Johansen <[email protected]> wrote: > Ah! It actually does work for me now! > > It was just a matter of my own stupidity and bad typing. The problem was > that I typed "external <the_ip><space><port>" instead of "external > <the_ip>:<port>". Everything works as expected now. > > oystein@lt-143044:~$ gnubg -t -q > GNU Backgammon 1.07.001 20240331 > > Copyright (C) 1999-2004 Gary Wong. > Copyright (C) 2004-2022 the AUTHORS; for details type `show version'. > > This program comes with ABSOLUTELY NO WARRANTY; for details type `show > warranty'. > This is free software, and you are welcome to redistribute it under > certain conditions; type `show copying' for details. > > (No game) external 172.25.210.35:9876 > Waiting for a connection from 172.25.210.35:9876... > Accepted connection from 172.25.208.1. > > Thank you, Jon, for testing this - else I would have given up! > > -Øystein > > tor. 28. aug. 2025 kl. 12:32 skrev Øystein Schønning-Johansen < > [email protected]>: > >> Oh! I think we are halfway there! >> >> That actually took me a step further. However the messages back from WSL >> gets blocked. >> >> "Windows socket error (reading from external connection): >> An established connection was aborted by the software in your host >> machine." >> >> Do you have some medicine for this as well? >> >> -Øystein >> >> tor. 28. aug. 2025 kl. 12:13 skrev Jon Kinsey <[email protected]>: >> >>> I think you need the actual wsl ip address, try: >>> wsl hostname -I >>> Followed by: >>> netsh interface portproxy add v4tov4 listenport=9876 >>> listenaddress=0.0.0.0 connectport=9876 connectaddress=<WSL_IP> >>> >>> Jon >>> >>> On 28 Aug 2025, at 10:49, Øystein Schønning-Johansen <[email protected]> >>> wrote: >>> >>> >>> Hi! >>> >>> I am experimenting a bit with external player - I would love to just >>> download and install a windows build of GNU Backgammon and then connect to >>> an external player hosted on a WSL based linux on the very same hardware. >>> >>> >>> - So I've downloaded and installed GNU Backgammon for windows. >>> - I have then installed GNU Backgammon on the WSL based Ubuntu 24.04 >>> with apt. (sudo apt install gnubg) >>> - Started gnubg on the Linux: gnubg -t >>> - started the external player: external 127.0.0.1 9876 >>> - Switching back to the GUI gnubg installation on Windows and >>> opening Setting->Players. Clicking the External player radio button and >>> typing in "127.0.0.1:9876 >>> >>> So, now I was hoping that it would work out of the box - however, I get >>> the error message in the Windows based GUI installation. It says: >>> >>> "Windows socket error (127.0.0.1:9876): >>> No connection could be made because the target machine actively refused >>> it." >>> >>> Is this supposed to work, or is it blocked by a setting on my computer? >>> Or is an incompatibility due to the implementation using Winsock on the GUI >>> installation and unix sockets on the WSL? >>> >>> -Øystein >>> >>>
