Method to play against a Windows engine under Linux with XBoard

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Roland Chastain
Posts: 680
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Method to play against a Windows engine under Linux with XBoard

Post by Roland Chastain »

Hello everybody!

I was sad that there is no Linux version of Rebel 16.2, so I tried to run it with wine and I saw that it worked. After that I said to myself, why not try in XBoard? And it works too!

In case someone is interested, here is how I did.

I created a script named rebel16.sh with the following content:

Code: Select all

#!/usr/bin/sh
wine Rebel-16.2.exe
And another script, xboard.sh:

Code: Select all

#!/usr/bin/sh

SCRIPT=`realpath $0`
SCRIPTPATH=`dirname $SCRIPT`

xboard \
-size small \
-debug -debugfile xboard.debug \
-fcp $SCRIPTPATH/rebel16.sh -fd $SCRIPTPATH -fUCI
And then I open a terminal and type:

Code: Select all

chmod a+x rebel16.sh
chmod a+x xboard.sh
./xboard.sh
And I could play a game versus Rebel. 8-)

Image

Thank you wine, thank you XBoard and thank you UCI2WB! :wink:
Qui trop embrasse mal étreint.
chrjly
Posts: 41
Joined: Wed Feb 03, 2021 10:45 pm
Full name: Christophe Jolly

Re: Method to play against a Windows engine under Linux with XBoard

Post by chrjly »

Thank you for this trick. I was running Winboard under wine to make my program play against a windows program before.
I think that you can also add the entry: "rebel 16" -fcp rebel16.sh -fd <path of script> -fUCI
into the engine list of XBoard.

Christophe
author of KnightX
User avatar
Roland Chastain
Posts: 680
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Method to play against a Windows engine under Linux with XBoard

Post by Roland Chastain »

chrjly wrote: Sat Feb 25, 2023 8:51 pm I think that you can also add the entry: "rebel 16" -fcp rebel16.sh -fd <path of script> -fUCI
Yes it works. But I had to provide a full path for both parameters.

Code: Select all

"Rebel 16.2" -fcp "/home/roland/Applications/moteurs/rebel/162/rebel16.sh" -fd "/home/roland/Applications/moteurs/rebel/162/" -fn "Rebel 16.2" -fUCI
I believe I need to do that for all UCI engines.
Qui trop embrasse mal étreint.
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Method to play against a Windows engine under Linux with XBoard

Post by hgm »

In principle that is not needed, but you should make sure that the engine command is prefixed by ./ in Linux if you want to execute it in a specified directory. The way it works is that XBoard (or UCI2WB) changes to the mentioned -fd before issuing the -fcp as a command.
User avatar
Roland Chastain
Posts: 680
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Method to play against a Windows engine under Linux with XBoard

Post by Roland Chastain »

Yes, I did as you said and it works. Thanks.
Qui trop embrasse mal étreint.