Chess Software
by the Webmaster
billwallchess.com

January 14, 2024

I've been wanting to write a how-to on chess software for a long time. I just haven't had the motivation to do so. However, unlike Bill Wall, my chessplaying has not been all that consistent: some years I play a lot of chess, other years I don't play much chess. But I often reinstall my operating systems and then end up having to reinstall my chess software. And after many years of doing this I want to share my experience. This tutorial assumes you have a computer with an operating system (preferably linux), and a working internet connection.

So there are several parts to building a functioning chess study suite. First, you need a chess database program. Then you need a chess engine. Finally you need a way to connect to FICS. Sure, you can connect directly through freechess.club however, this really doesn't provide maximum functionality and usability.

My purpose in this article is to describe how I've done it. I'll go through various software that I use, show you what I've landed on as an ideal chess suite.

This presentation is geared towards those who run the linux operating system. If you're not running linux then you should ask yourself why. For chess, as for so many other uses, linux is simply a faster, better, more stable, more secure operating system than Windows. But I fought the OS wars a long time ago, so to each his own... I run Ubuntu-based LinuxMint version 21.2 Xfce. The Xfce is the most light-weight version of Mint. Of course you can run the Mate or Cinnamon editions. For obvious reasons, Mate should be the preferred version for chessplayers, but I like Xfce because I use my computer for other things besides chess. I want the OS to be as light as possible — in fact I turn off all the eye candy like compiz and stuff.

So, the first thing is a chess database. I've tried commercial versions over the years but for many things out there, there is usually a free version that is nearly or just as good and chess is no exception. While I was using ScidvPC for a while, I noticed maintenance stopped at version 4.24 which had been out there for a while. ScidvPC was intended as an improvement on Scid — and for a while it was — but out of curiosity I decided to take a look at the original fork, Scid, and it looks like that's maintained at a more recent version. Now if you just go to Scid's website and click on Download, you'll be gifted a binary package. I like to compile stuff from source when I can. So instead of taking the binary I went to the repository and downloaded the latest snapshot. Just go to the repository and click on "Download Snapshot" button on the right about 1/3 of the way down the page. You will get a zip file that is much smaller (about 15 MB) than the binary package (300 MB). This is the source code for Scid. Download the file and save it somewhere easily accessible later.

I like to install this stuff in /usr/local which I usually configure as a separate partition so that if I have to reinstall the OS I don't have to reinstall or copy back everything I've added. As part of the OS setup, I change ownership of /usr/local to my own username with the command
% sudo chown -Rv username.username /usr/local

**Note that the "% " is the command prompt and not part of the actual command. It is shown for illustrative purposes.
Where "username" is the name you use to log in. If you haven't done this, go ahead and do it now. If you don't know your username, you can open a terminal and enter the command "whoami". The chown command makes it convenient so that you do not have to sudo every time you need to write to /usr/local. The -Rv flags mean (R)ecursive and (v)erbose respectively, so that all the files and subdirectories are changed and you get to see that happen.

The download will have a crazy name like scid-code-f2cb321488c83d65fa1937db82b4d38e9df60d3d.zip. Just copy this file to your /usr/local directory and unzip the contents like so. Remember you don't have to type that crazy file name character-by-character! Just highlight it and click the middle mouse button to paste.
% cp scid-code-f2cb321488c83d65fa1937db82b4d38e9df60d3d.zip /usr/local
% unzip scid-code-f2cb321488c83d65fa1937db82b4d38e9df60d3d.zip
You will get a directory called something like scid-code-f2cb321488c83d65fa1937db82b4d38e9df60d3d. Now just go into that directory and run the commands like so:
% cd scid-code-f2cb321488c83d65fa1937db82b4d38e9df60d3d
% ./configure --prefix=/usr/local
If you get errors about not having tcl and tk installed on your system, you can install the development headers with:
% sudo apt-get install tcl-dev tk-dev
If I recall, tcl and tk were the only packages I needed to add. Now, I can just run "make" and "make install"
% make
% make install
The make process may take a few minutes. Now, if you get errors about not having a make command, or a compiler, etc. then you need to install essential development tools with:
% sudo apt-get install build-essential
This will pull in the needed files to compile programs from source. Then you should be able to run make and make install per the above.

Once you have completed the "make install" step successfully, then you are ready to run Scid. "Successfully" means that we did not get any errors on the "make" or "make install" steps. If you got errors, they would be reported at the terminal.


Running Scid

Now that you have Scid built, running it is trivial. Just open a terminal window and type scid:
% scid
After a few seconds — or maybe not depending on how fast your computer is — you'll see the main Scid window pop up. You'll be greeted by a chess set. There are dozens or hundreds of options in Scid, and I don't have time to go into them all. But you can change the appearance of the chess set by going to "Options" then "Preferences". I suggest piece style "Good Companion" which is the USCF-looking pieces found in most chess diagrams today. You can also adjust the color of the light squares. Soft light green for the black squares and off-white for the white squares seems to work best for me but try the colors until you find something that works for you.

Scid has the ability to read PGN files. Download a PGN from our website billwallchess.com and try opening it in Scid. Go to "File" and "Open" and point to your downloads directory. Select the file and click "open". The file will load and you'll see the list of games on the right side. You can double-click on any of the games and use the arrows at the right bottom just below the board to play through the game. You can click on the Notation tab to see the moves from the game.

As I mentioned, Scid has many other quirks and features which I won't go into here. You'll just need to experiment with the software to see what works best for you. One thing I don't recommend, however, is using Scid to play chess on the free internet chess server (FICS). And it is to FICS our attention now turns.


Free Internet Chess Server (FICS)

In order to play on FICS (freechess.org) you can login as a guest or you can register an account. If you want to login as a guest and just play a few blitz games that's one thing. I often do that when I'm on the road or I just don't want to play under my account name. But if you want to take advantage of other things FICS has to offer (like a ratings system, tournaments, online tournaments and so on...) you'll need to register at freechess.org. You can then login via freechess.club for casual play. But for more serious play, I suggest you set up a chess client, and here I'll show you how to set this up. (One thing about FICS - once you pick a handle (username) you're STUCK WITH IT. So make sure you pick a name you really like and can live with for a long time, not something that strikes your whim today but a year from now you'll be wondering, "WHY do I call myself this?"). Write down your username and password that you register on FICS. You'll need this for the steps below.

Before I get into setting this up however, some comments are in order as to "Why FICS?" There are a lot of chess sites out there such as chess.com, lichess.com, and so on. I've tried many of them. You are bombarded with ads, eye candy, lesson offerings, and a lot of distractions. A lot of this you have to pay for. To get rid of the ads you have to purchase memberships, etc. Some people like this stuff, but I'm not a fan. When I log on to a chess website I want to do one thing: play chess. I'm not interested in chess lessons (I have a great chess coach!), and I really don't like seeing ads (not to mention I don't know what code or cookies they put in there, and if you refuse the cookies most websites won't work properly). People I've showed FICS to will often complain that the interface is ancient and cumbersome to deal with. At first glance it's true: FICS looks like the mid-90s because it was written in the mid-90s and it has not changed. But that's okay. Because if you stick with it what you will find is that it is a very powerful interface for playing chess and getting chess stuff done. So stick with me. You'll be glad you did.

Okay, so to set up your connection to FICS you'll need to first install xboard. Remember what I said about compiling stuff from source? Well for xboard, don't. It's difficult, there are a lot of packages that you need which don't come by default, and unless you need support for some bygone feature (like pixmap support) there really isn't a reason to compile this from source. Just install it with
% sudo apt-get install xboard
This command will install a recent version of xboard on your system. As of this writing the version is 4.9.1.

Now, I want you to create a text file in your home directory and call it .icsrc ("dot" icsrc - this will be a hidden file in your home directory). The contents of that 4-line file will be:
username
password
set shout 0
set cshout 0
And that's it. "username" is your username when you registered on FICS (also called a FICS "handle"). "password" is the password you used when you registered on FICS. Use a text editor to create this file (NOT an office program like LibreOffice). Once you've created the file run the command
% chown 600 ~/.icsrc
for basic security (so that other users or user processes on your system don't have access to see your password).

Now we need to build a program called timeseal (nowadays "zseal"). zseal is important because of network lag, and it helps to ensure that you don't lose a game because the server thinks you ran out of time when you really didn't. There are other reasons to run zseal but that is the main one. Go to the timeseal/zseal source page here and grab the source code by clicking on the green "Code" button and then "Download Zip". Then, similar to what we did with scid, copy that file into your /usr/local directory and unzip it:
% cp zseal-master.zip /usr/local
% cd /usr/local
% unzip zseal-master.zip
% cd zseal-master
Now we can build it and copy the new executable into /usr/local/bin:
% ./configure --prefix=/usr/local
% make
% cp zseal /usr/local/bin
The last step is to make a script that will start xboard and log into FICS. Open a text editor and dump the following into that file:
#! /bin/sh
xfce4-terminal -T FICS -e "xboard -fn 8x16 -size 80,1 -ics -icshelper zseal -icshost 54.39.129.129 -sgf ~/fics-games.pgn"
exit;
Note that the line beginning with xfce4-terminal and ending with ~/fics-games.pgn needs to be on a single line. Save this file as "fics" in your /usr/local/bin directory and enter the command
% chmod 755 /usr/local/bin/fics
This will make the file executable so that you can run it.

Let's talk a little about the content of the fics file we just created.

xfce4-terminal - this command might be different on your system depending on the terminal program you are using by default. You can search your linux distro with the words "default terminal program" or something like that to find out what your default terminal is. Examples of terminal programs are gnome-terminal and xterm. There are many others. But if you don't have the right terminal program in there the command won't work. Also, you need to check that your terminal program supports the -T and -e options. If it does not, this too will be a problem as you'll likely get a syntax error. As far as I'm aware, most terminal programs support the -T and -e options. -T simply puts a title in the title bar, and -e tells the terminal to execute the command following -e after the terminal starts.

-fn flag tells xboard what size font to use.

-size flag tells xboard what size pieces to use. Notably the ",1" here denotes a thin line between squares.

-ics tells xboard to run in internet chess server (ics) mode.

-icshost 54.39.129.129 tells xboard where to connect to the FICS server.

-sgf ~/fics-games.pgn tells xboard to save every game played to a local file called fics-games.pgn in your home (~) directory.

Computers don't understand stuff like "freechess.org". When we go to freechess.org in our browser, we are actually asking the computer to connec to the Internet Protocol (IP) numeric address associated with freechess.org. To do that the computer has to perform a Domain Name Server (DNS) lookup. Sometimes DNS can get munged. 54.39.129.129 is the IP address of the FICS server. This is public knowledge. I have had in some cases trouble if I use the hostname "freechess.org". So I use the IP address to eliminate the need for a DNS lookup. Now if the IP changes then you will have to use the command
% nslookup freechess.org
to find the new IP address, but the IP for freechess has not changed in a VERY long time.

Let's test the new fics script. Open a terminal and type in "fics" and hit enter.
% fics
You should get two windows that pop up - one is the xboard window and the other is the FICS console terminal window. You can do a command like
fics% seek 5 1 u
to get a five minute blitz game. I will post another article on FICS commands or you can browse the help pages on the freechess.org website.


Chess Engine

There are many chess engines — a very good free engine is Stockfish. Grab the code here by clicking on the green code button, download the zip file, and copy the zip file into your /usr/local directory. Now we'll do something similar to what we did above:
% unzip Stockfish-master.zip
% cd Stockfish-master/src
% make -j profile-build ARCH=x86-64-avx2
% cp stockfish /usr/local/bin
The last step is to set up Scid to use Stockfish. Follow these steps:

Start Scid by opening a terminal and typing scid:
% scid
1. When the Scid window pops up, at the top menu bar, go to Tools -> Configure Engines.

2. Next, click on "New...". You'll get another box. In this box, put:

Name: Stockfish

Command: /usr/local/bin/stockfish

Elo: Put 3500 but this is just for reference. If you really want to know click here. Looks like it's above 3500. Given that the world champion is usually rated 2800, I guess Stockfish is pretty good.

Date: Click "Update" to fill in with the date.

3. Click OK button

You should see Stockfish at the top of the Engine list.

4. Click OK button

Now, at the main Scid display, again click on Tools -> Analysis Engine.

Highlight Stockfish and click "OK."

You should now see the Stockfish analysis generating on the analysis tab.

Well, if you're reading this and everything has worked so far then I've written a pretty good article. That's all I have time for today. Good luck in your chess games.



Official Website — BILLWALLCHESS.COM

Please report broken or duplicate links to the Webmaster

All Contents Copyleft 2015— by William D. Wall

This site and all contents herein may be freely used, modified, and distributed on the condition that proper attribution is given and anything derived from any content on this site is bound by this same condition.

Also we kindly ask that you include link to our page on your website.

Thank you.