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 <
oyste...@gmail.com>:

> 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 <jonkin...@gmail.com>:
>
>> 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 <oyste...@gmail.com>
>> 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
>>
>>

Reply via email to