Linux and xboard

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Chan Rasjid
Posts: 588
Joined: Thu Mar 09, 2006 4:47 pm
Location: Singapore

Linux and xboard

Post by Chan Rasjid »

Hello,

I've just installed Fedora7 and also xboard.

I'm new to Linux. How come xboard is not exactly like winboard. There is no option to set time control.
Where is the "winboard.ini" for linux,etc to install engines?

Thanks
Rasjid
Volker Pittlik
Posts: 619
Joined: Wed Mar 08, 2006 9:10 pm
Location: Murten / Morat, Switzerland
Full name: Volker Pittlik

Re: Linux and xboard

Post by Volker Pittlik »

Chan Rasjid wrote:Hello,

I've just installed Fedora7 and also xboard.

I'm new to Linux. How come xboard is not exactly like winboard. There is no option to set time control.
Where is the "winboard.ini" for linux,etc to install engines?
...
It is not so comfortable as Winboard. A *.ini file does not exist. In all distributions I saw it comes completly unconfigured so that it is displayed with a gigantic board, complaining missing GNUchess (Ubuntu), Crafty (Suse) or something I can't remember (Fedora) and exiting without doing something.

However there are several ways to use it easily. A condition is that you are willing to learn a little bit about Linux what I presume in your case.

This is the way I do it. I don't claim this is the best method but it works for me.

Configuring Xboard: If I want to play I just want to type a short command and the game should begin. This is "xb" or "xb-hum" on my machine. Of course you can name the commands as you like. Both are litte shell scripts located within the path (~/bin in my case).

Because I'm to lazy to type something like:

Code: Select all

xboard -tc <seconds> -inc <seconds> -mps <number> -xexit -debug &#40;or xdebug&#41; <more option> -fcp "./programmName>" -fd <pathToProgram> -scp the SameFor SecondProgram -size <whatever> -highlight -drag -legal -timeDelay -1 -coords -$autoflagType -xreuse -xreuse2 -sgf <more options> -mg <number>
I thought for something easier. Most options I never change. Usually only the time control, programs and sometimes boardsize is changed. Therfore I have two scripts: One to change the variables which is called by another one which contains theother variables I don't change often which calls Xboard then with all the parameters.

In additon I have two scripts for each engine which do nothing more then to set the fcp and fd variables.

Example: Let's take the program Jonny.

1. I have two scripts for the program (1st-jonny and 2nd-jonny). The first looks like:

Code: Select all

#! /bin/bash

fcp=./jonny
fd=$cp/jonny
You will easily guess how the second looks like. $cp is the path to my chess directory defined in my .profile.

Now the script with the variable Xboard parameters (I've called it xbinit.):

Code: Select all

#! /bin/bash

mg=2
tc=1
inc=1
mps=40
debugType=xdebug
ponderType=xponder
autoflagType=autoflag
thinkingType=thinking
#size=Huge
#size=Big
#size=Large
#size=Bulky
#size=Medium
#size=Moderate
#size=Average
#size=Middling
#size=Mediocre
#size=Small
size=Slim
if &#91; ! "$sgf" &#93;; then
	sgf=$cp/data/xbgames.pgn
fi

if &#91; ! "$fcp" &#93;; then
	echo
	echo First chess program not defined.
	echo
#	fcp="./polyglot glaurung-eps2.ini"
#	fd=$cp/polyglot
fi
if &#91; ! "$scp" &#93;; then
	echo
	echo Second chess program not defined.
	echo
#	scp="./polyglot glaurung-eps2.ini"
#	sd=$cp/polyglot
fi
You see the time control is set in this file. If you look at the line with "glaurung" in it you can guess how I handle uci engines. You can leave everthing after "size=slim" out.

And now the script with the "constant" parameters:

Code: Select all

#! /bin/bash

cd $cp/data
. xbinit

echo

nice xboard -tc $tc -inc $inc -mps $mps -xexit -$debugType -$ponderType -fcp "$fcp" -fd $fd -scp "$scp" -sd $sd -size $size -highlight -drag -legal -timeDelay -1 -coords -$autoflagType -xreuse -xreuse2 -sgf $sgf -$thinkingType -mg $mg
echo
Please note that ". xbinit" is something different than "xbinit". To use nice is not necessary, but I like to run the chess stuff with low priority on this machine.

To play a game I now only change the "mg" parameter, adjust time control and call both engine scripts. But because I'm even to lazy for that I have a script also for that.

Code: Select all

#! /bin/bash

. 1st-alaric-uci
. 2nd-shredder
. xb
Now I only have to type "xbtest" what is the name of the last script and the match begins. To play tournaments I simply do that in a loop. I also use predefined groups for that.

Maybe it is a bad idea just to copy the line and start the scripts. Most likely it will not work for you for reasons I can think about and -more important- I can not think about. I hope you can get the idea.

Again: I don't claim this is the perfect way to do it. It just works for me.

Volker
User avatar
mariaclara
Posts: 4186
Joined: Wed Mar 08, 2006 9:31 pm
Location: Sulu Sea

Re: Linux and xboard

Post by mariaclara »

:D hi Volker,

do you think you can teach me how to run xboard in ubuntu linux?
:D

if yes, do i go to winboard forum?

if no, its ok. no prob.

thanks Volker. :wink:
.
.

................. Mu Shin ..........................
glorfindel

Re: Linux and xboard

Post by glorfindel »

There is no winboard.ini, but the suggested way to set the preferred default options for XBoard is in the .Xdefaults file (in your home directory). As far as I know, it is a file that stores options for all applications that use the somewhat primitive X toolkit for their user interface. XBoard also uses this toolkit.

You can set every option that you can see in the XBoard man page ($man xboard), but you must use the long name of the option, e.g. "timeControl" and not "tc"

As an example here is my .Xdefaults file

Code: Select all

xterm*background&#58; darkblue
xterm*foreground&#58; white
xterm*font&#58;-misc-fixed-*-*-*-*-13-*-*-*-*-*-iso8859-7

xboard*background&#58; darkblue
xboard*foreground&#58; white
xboard*showThinking&#58;true
xboard*ponderNextMove&#58;false
xboard*colorizeMessages&#58;true
xboard*boardSize&#58;72,1
xboard*lightSquareColor&#58;lightblue
xboard*darkSquareColor&#58;blue
xboard*ringBellAfterMoves&#58;true
xboard*timeControl&#58;15
xboard*timeIncrement&#58;15
xboard*soundMove&#58;/usr/share/sounds/gnometris/turn.wav
xboard*firstChessProgram&#58;/usr/games/bin/crafty
xboard*firstDirectory&#58;/usr/local/share/chess
xboard*secondChessProgram&#58;/usr/local/games/bin/yace
xboard*secondDirectory&#58;/usr/local/share/chess
xboard*loadGameFile&#58;/home/christos/chess/mygames.pgn

urxvt*background&#58; darkblue
urxvt*foreground&#58; white
This file should be read every time you log in your X session. I have a line

Code: Select all

xrdb ~/.Xdefaults
in my ~/.xinitrc file for this, but I am not sure it is necessary.

If you make changes to ~/.Xdefaults and want to see their effect without logging out and logging back in, you have to type

Code: Select all

$xrdb -m .Xdefaults
If you call xboard from the command line, any parameters you give there override the ones in this file.

I hope this helps.

Edit, PS: There is also another way to start Xboard, scotty.py a python script written by Alexander Wagner. It can be found here, it makes installation of multiple engines easier, and you must have Python installed.
Chan Rasjid
Posts: 588
Joined: Thu Mar 09, 2006 4:47 pm
Location: Singapore

Re: Linux and xboard

Post by Chan Rasjid »

Thanks everyone,

I think with the details from Volker, I should be able to figure thinks out.

I'll see if I can find .Xdefaults or sort of configuration files(very new to Linux).

Rasjid
User avatar
Ponti
Posts: 493
Joined: Wed Mar 15, 2006 6:13 am
Location: Curitiba - PR - BRAZIL

Re: Linux and xboard

Post by Ponti »

Try using Arena under Linux.
Just install Wine. Arena runs from your HD`s FAT or NTFS partition. The only difference is that you`ll have to assign the path to your engines again, but that`s quite easy, just a few clicks under Arena GUI.
It`s also _much_ easier to run eng-eng matches!

A. Ponti
A. Ponti
AMD Ryzen 1800x, Windows 10.
FIDE current ratings: standard 1913, rapid 1931
Volker Pittlik
Posts: 619
Joined: Wed Mar 08, 2006 9:10 pm
Location: Murten / Morat, Switzerland
Full name: Volker Pittlik

Re: Linux and xboard

Post by Volker Pittlik »

Ponti wrote:Try using Arena under Linux.
...
It`s also _much_ easier to run eng-eng matches!

i
Except the circumstance that it does not work. I tried it really hard with the help of C. Conkie and H. Erickson: no success without doing things not to recommend.