ChessBase @ Linux

Goal

Run Fritz 8 on Linux.

Note: ChessBase (ie. the Database from ChessBase) is not covered in this document. I use scid and Fritz is enough to convert a *.cbh-Database to PGN to feed it to scid.

The Setup

Unfortunately, ChessBase till now did not port any of their products to Linux (or any other operating system) and additionally they did not even document their file format so it could be imported by other applications so there is some need to be able to run ChessBase-programs like Fritz in a Linux environment. Also the additional products like the training cd's of ChessBase might be of some interest.

For that reason it is worth to have a look wether it is possible to run these tools without the nasty necessity to waste several hundrets of MB for a never really used runtime environment (Microsoft Windows in that case). Especially as booting into DOS is a possibility of course but requires to keep an other OS up to date, patch it and so on. (Besides the tendency of all the flavours of DOS to selfdestruction, and the point that DOS cost's real money.)

Fortunatley the wine project made some good progress in recent years so it is now possible to run some real world applications (actually quite a lot of them) on the systems supported by them.

The goal of this document is to describe how to set up Fritz 8 in this environment. As this is a real world example and no theoretical "what should be done and what should be possible"-scenario: the system used for this setup is Debian GNU/Linux 3.1 (sarge) running on an IBM ThinkPad T41p. On the ChessBase side Fritz 8 is used, though it was also possible to run e.g. Shredder classic and Arena in a similar manner.

As for Shredder the reader is strongly encouraged to support S. Mayer-Kahlens efford to have a native version of the program, so consider it just as a "it is possible", but get the real stuff. :) There is also some additional information on Shredder for Linux available.

Before going into a more detailed description it should be said what was the final result here. First of all I got all basic functionalities of Fritz working. That is: the gui starts up nicely, it is actually possible to play Fritz, use it's analytical features also with several engines, and use its database interface (actually the main reason to set it up; to be able to export ChessBase Files to PGN and then finally import them into scid). Additionally the basic multi media features worked here well, that is sound for the board, move announcements and the commentator. Also the simple 3d-board view is working.
Not working here is the more advanced mm-stuff, that is videos wthin the Chess Media System (this requires a working version of Windows Media Player which till now refused to install here (though it should be possible to run it), the context sensitive online help (not supported by wine yet), and the photorealistic 3d-features which require DirectX.

So in short: the usefull stuff is working, the pretty useless one not.

The easy way: CrossOver Office

The easiest way to get the whole thing working is obviously CodeWeavers CrossOver Office, which is a commercial special edition of Wine. Just install CrossOver, and then install Fritz as "unsupported application" into it's own bottle. It worked very well with CrossOver Office Professional 4.x as well as 5.0. If you do not want to fiddle arround in the setup and want a nice Desktop Integration right into your Gnome Desktop (or even KDE) this is just the way to go, also considering the pricings of CodeWeavers which are actually quite moderate.

Installing wine

If you want to go with the free version of wine some more work is required.
Installation of wine on a Debian system is actually pretty easy. The first and most straight forwared approach is to just use the wine subsystem that comes with sarge. To this end install the following packages:
		libwine        0.0.20050310-1 Windows Emulator (Library)
		libwine-alsa   0.0.20050310-1 Windows Emulator (ALSA Sound Module)
		libwine-print  0.0.20050310-1 Windows Emulator (Printing Module)
		wine           0.0.20050310-1 Windows Emulator (Binary Emulator)
		wine-utils     0.0.20050310-1 Windows Emulator (Utilities)
		winesetuptk    0.7-1.1        Windows Emulator (Configuration and Setup
		
by just calling aptitude
		aptitude install wine wine-utils winesetuptk libwine libwine-alsa libwine-print
		
Afterwards you will have a working wine environment which just needs configuration.
Actually using Debians wine gave here the best results so I would encourage it though debian's own wine is quite a lot older then the one you can get at the wine hq.

Wine from Source

Following the instructions a wine hq for building Debian packages on sarge is actually not possible, as they do not build the packages against Debian stable but against Debian stable but against Debian unstable. For that reason one should download the source tgz and follow the non-debian-specific instructions. This works out of the box, as it was tried for V0.9.2 as well as 0.9.3. To ease up the steps there is a build_wine script available which fetches the source for 0.9.3, unpacks it and installs it. For this a root-pw is required and it will install to /usr/local. If you want wine to live in another location see the wineinstall-script that comes with the package, as build instructions for wine are beyond the scope of this document.
Note: V0.9.2 solves some issues (eg. it gives you a correct icons) but introduces a more or less serious problem: one is not able to open the Settings-dialog of Fritz with this version of wine. This is nasty but one can configure Fritz entirely with vi from the shell as ChessBase stores all settings in the following files:
			ChessBase/ChessProgram8/ChessBase/ChessProgram8/GUI8.ini
			ChessBase/ChessProgram8/ChessBase/ChessProgram8/Shortcuts.ini
			ChessBase/ChessProgram8/ChessBase/ChessProgram8/Default.lay
		
and
			fake_windows/Windows/ChssBase.ini
		
But it is a bit nasty anway to edit arround there.
Update: 15.12.05
Wine V0.9.3 solves the above mentioned settings dialog issue. As first tests are concerned Fritz runs very well in this new environment.

Configuring Wine

This worked here most easily using winesetup wich comes with the package winesetuptk. Just follow the dialogs and you will end up with a working setup.
In files the setup is done via the files in your $HOME/.wine. Additionally one has to set the symbolic links in $HOME/.wine/dosdrives to respect your system configuration. The most important link is the one called c: which has to point to the location of your faked_windows directory. In $HOME/.wine/config most of the windows specific settings are located. The other files contain the windows registry and are not really needed for Fritz, at least the defaults should work. Note that you have to adopt the $HOME/.wine/config to respect the paths in your system!

Installing Fritz

This is the nasty part. Unfortunately it was not possible here to get the installer used by ChessBase to cooperate with the free version of Wine. It works though if you have CodeWavers CrossOver Office arround. Otherwise you need to obtain somehow the ChessBase tree. Most eaily by copying it from a DOS-box with an installed edition of Fritz. One way to go could be to install Fritz to some USB-Stick on a windows box and transport the obtained ChessBase directory to your linux installation. The crucial point is that this directory is nearly entirely selfcontained!
Additionally to the ChessBase folder all one needs are two DLL-files that should live in fake_windows/Windows/System: MFC42.DLL and MSVCIRT.DLL. Just copy them from your successfull Fritz installation or any Windows box you have at hand. They were installed by Fritz to this directory.

Running Fritz

Suppose the ChessBase folder lives in /opt/chess/DOS then one would start Fritz by
			wine /opt/chess/DOS/ChessBase/ChessProgram8/ChessProgram8.exe 
		

As this is a bit a long typing I made up two short scripts. The first one (winesetup) just takes care about the fact that some DOS-Program gets executed. For my testing I install wine to /opt/wine so in case I want my selfbuilt version I just set the variable $addwine properly then this wine version is used. Additionally I placed my fake_windows directory in /opt/chess/share/wine/fake_windows and also store a generic set of regestry files there. Most people know about the stability of Windows' registry so I feel it is good not to work on a working copy of these files. So winesetup first checks wether a $HOME/.wine exists. If so, it believes the user set up all properly. If not, it creates it and copies the necessary files and links.

Though winesetup is probably nice as such it is just sourced by Fritz which actually fires up Fritz. After sourcing the winesetup it also tries to mount Fritz' CD-ROM. For one thing this CD can be handy if you did not copy all files to your harddisk (speach, databases, books) on the other hand Fritz is quite annoyingly asking for this CD-ROM. Besides the Fritz script also passes all given commandline parameters to the program.

Actually the latter is a bit a dark point in Fritz as it is barely documeneted, so I know only of two parameters, which are pretty helpfull anyway. To get rid of the annoying "Start Fritz or Playchess"-Dialog at the programs startup one might specify either -engine to get right into the chess program or -login to connect playchess straight away. The last parameter is -database which will invoke Fritz' database infterface. Fortunately it seems that ChessBase noticed, that it would make perfect sense to add also a database file to the call of Fritz. Suppose (as it is usually the case) wine gives you your / directory as Z: and your database lives in /opt/chess/DOS/ChessBase/Bases/database.cbh. Then you can access it using the following call to Fritz:

			Fritz -database Z:\\opt\\chess\\DOS\\ChessBase\\Bases\\database.cbh
		

Note that you have to give the path like wine sees in as DOS-path. Also use double backslashes, otherwise your shell will most likely drop them. As this is pretty annoying and no tab expand works with nasty backslashes you could also use ChessBase which is a short shell script that does this substitution if passed a Unix-compliant file name. It also adds the Z: at the beginning of the path.

Chatter: at least my german edition of Fritz is pretty chatty, and likes to talk all the time. But to get this working I had to copy the talk.cht as well the directory TALK to my harddisk and set the writeble bit for the files and directories. Then after searching for talk.cht using Fritz' menues everything was fine. Till I switched it off ;)

Working/Not Working

Actually I found that Fritz runs very well in Wine. I got all major parts working, the engine is usefull for analysations or games, the coach and the training functions work very well, also stuff like "explain all moves", sound and chatter. The database is usable to open ChessBase Files and export them to PNG, do some searching and stuff as Fritz allows it.

Problems arrise in rare cases with the screen update. In this case I just shade the window and unshade it again (in my WindowMaker setup just a doubleclick on the title bar). The forced redraw fixes these problems. Additionally I found that the "explain all moves"-pane takes quite some time to build up (well Fritz has to calculate, right?) and one could get the impression this function is not working. Also if Fritz is told to analyse many lines at once I notice a considerable slow down in screen updates. I found that having more than about 3 to 5 lines in concurrent analysis makes it difficult to select a menu option as the redraw is very slow (see for my hardware setup). In playchess the Earth Globe is definitively broken, it causes the client to crash immediately. Using training cd's from ChessBase worked here very well except the video parts due to my not installed MediaPlayer. Probably one could get this working with more effords.

A minor inconvenience is given by the fact that Wine can not open M$ compressed html-helpfiles yet. For this reason the online help is not available. (BTW: if you are using Fritz 6 you are in luck here as it uses old style Windows Help-Files.) To view it anyway you can use e.g. xchm. Just open the ChessBase/ChessProgram8/Eng.chm for the english version or ChessBase/ChessProgram8/deu.chm. But sources on the web were almost right that it's not really worth the efford. The online help seems a bit outdated in some areas and also offers quite some missinformation. Clearly a point where ChessBase could improve, but the program is pretty easy to use. For the more advanced features ChessBase seem to prefer to publish them on the web anyway.

Though it would be pretty nice to have the Fritz eninge available as analysis or even playing engine in a native Linux GUI this is unfortunately not possible as ChessBase chose to deliver only DLL's. If someone could make a simple stub linked against them to turn them into UCI- or xboard-engines... Probably there is a way to use them in Arena or the Shredder Windows GUI? Then there would probably be a way to use the engine as such.

Conclusion

Fritz has a pretty nice GUI that runs indeed pretty well on Linux. Coaching functions are quite good there, here Shredder's native GUI needs considerable some further improvement to join in the league as well as all other free GUIs on Linux currently need. For those used to the Fritz interface the setup with wine is probably an option compared to dual boot installations, especially if most other things are done on Linux.

Notes

Owning a "SE" version of Fritz (which nobody really specified what SE means) here is the solution... The SE-editions do not come with a serial number and real access to playchess. As such they are not upgradable nor registerable. My GUI dates from October 2003, so it is actually quite old. Managing to get an upgrade and even running IUpgrade.exe (in wine, sure) gave me the possibility to check a real Fritz 8 as well, and it worked the same. The un-updated SE gave a bit a better feeling though, so I believe the real Fritz patched to the latest version just needs a really new version of wine. (Normally I use Debian's Wine. I did not extensive checks with 0.9.3 yet.) As I saw no obvious improvements for my needs I stay with the
Silver Admin rule: Don't fix if it ain't broken

Additionally I did also test Fritz 6, and it works also nicely. So in case you have an old version lying arround its probably just worth a try.
An actual screenshot taken on Debian GNU/Linux 3.1 (sarge), showing Fritz 8's main window in the 15th move of black in the 'Immortal Game'. Fritz is analysing 3 lines concurrently. Square highlighting is on, the current threat is displayed. Also shown is the "Explain all moves" pane (undocked upper right) and the database browser. Windowmanager is WindowMaker 0.9.2, the Desktop is done by ROX 2.4

Similar programs

  • Shredder Classic. I did no extensive testing there as there is a native Linux version. Support this efford to bring high class Chess Software to Linux!
  • Arena works exactly the same as Fritz in wine. Just copy the Arena-Directory tree somwhere accessible by wine. Starting out with the Fritz script is it easy to set up the same for Arena. Note that Arena stores (other then ChessBase!) nearly everything within the Windows Registry. So keep a copy of your *.reg-files handy. (Arena sets them up correctly to it's defaults though if the settings are lost.)
  • Queen 5 from DGT also seems to work, so one can use it to read out the DGT Electronic Chess Board. In case you want to use a DGT-Board on Linux please also have a look at the native driver available here. The latter allows you to use the board with every chess program that is capable of engine tournaments like e.g. xboard.
  • ChessBase Reader works out of the box. It is a single binary, run it through wine. It can be used as a light weight alternative to Fritz for some of the ChessBase Trainings CD's.


Back to Theory II   Physics department homepage   Universität Würzburg