Generate the xboard man page (now covering cmail too) from the texinfo
[xboard.git] / xboard.texi
1 @ifinfo
2 @format
3 INFO-DIR-SECTION Games
4 START-INFO-DIR-ENTRY
5 * xboard: (xboard).         An X Window System graphical chessboard.
6 END-INFO-DIR-ENTRY
7 @end format
8 @end ifinfo
9
10 @titlepage
11 @title XBoard
12
13 @page
14 @vskip 0pt plus 1filll
15 @include copyright.texi
16
17 @end titlepage
18 @ifset man
19 .TH xboard 6 "$Date: " "GNU"
20 .SH NAME
21 .PP
22 xboard @- X graphical user interface for chess
23 .SH SYNOPSIS
24 .PP
25 .B xboard [options]
26 .br
27 .B xboard -ics -icshost hostname [options]
28 .br
29 .B xboard -ncp [options]
30 .br
31 .B |pxboard
32 .br
33 .B cmail [options]
34 @end ifset
35
36 @node Top
37 @top Introduction
38 @cindex introduction
39
40 @ifset man
41 .SH DESCRIPTION
42 @end ifset
43
44 XBoard is a graphical chessboard that can serve as a
45 user interface to chess engines (such as GNU Chess), the
46 Internet Chess Servers,
47 electronic mail correspondence chess, or your own collection of saved games.
48
49 This manual documents version @value{VERSION} of XBoard.
50
51 @menu
52 * Major modes::     The main things XBoard can do.
53 * Menus::           Menus, buttons, and keys.
54 * Options::         Command options supported by XBoard.
55 * Chess Servers::   Using XBoard with an Internet Chess Server (ICS).
56 * Firewalls::       Connecting to a chess server through a firewall.
57 * Environment::     Environment variables.
58 * Limitations::     Known limitations and/or bugs.
59 * Problems::        How and where to report any problems you run into.
60 * Contributors::    People who have helped developing XBoard.
61 * CMail::           Using XBoard for electronic correspondence chess.
62 * Other programs::  Other programs you can use with XBoard.
63 @ifnottex
64 * Copyright::       Copyright notice for this manual.
65 @end ifnottex
66 * Copying::         The GNU General Public License.
67
68 * Index::           Index of concepts and symbol names.
69 @end menu
70
71 @node Major modes
72 @chapter Major modes
73 @cindex Major modes
74
75 XBoard always runs in one of four major modes.  You select the
76 major mode from the command line when you start up XBoard.
77
78 @table @asis
79 @item xboard [options]
80 As an interface to GNU Chess or another chess engine running on your
81 machine, XBoard lets you play a game against the machine,
82 set up arbitrary positions, force variations, watch a game between two
83 chess engines, interactively analyze your stored games or set up and
84 analyze arbitrary positions.  (Note: Not all chess engines support
85 analysis.)
86 @item xboard -ics -icshost hostname [options]
87 As Internet Chess Server (ICS) interface, XBoard
88 lets you play against other ICS users, observe games
89 they are playing, or review games that have recently finished.  Most
90 of the ICS "wild" chess variants are supported, including bughouse.
91 @item xboard -ncp [options]
92 XBoard can also be used simply
93 as an electronic chessboard to play through games. It will read and
94 write game files and allow you to play through variations
95 manually. You can use it to browse games off the net or review games
96 you have saved.  These features are also available in the other modes.
97 @item |pxboard
98 If you want to pipe games into XBoard, use the supplied shell
99 script @file{pxboard}.  For example, from the news reader @file{xrn},
100 find a message with one or more games in it, click the Save button,
101 and type @samp{|pxboard} as the file name.
102 @item cmail [options]
103 As an interface to electronic mail correspondence chess, XBoard
104 works with the cmail program. See @ref{CMail} below for
105 instructions.
106 @end table
107
108 @node Menus
109 @chapter Menus, buttons, and keys
110 @cindex Menus
111
112 To move a piece, you can drag it with the left mouse button, or you
113 can click the left mouse button once on the piece, then once more on
114 the destination square.  To drop a new piece on a square (when
115 applicable), press the middle or the right mouse button over the
116 square and select from the popup menu.  In cases where you can drop
117 either a white or black piece, use the middle button (or shift+right)
118 for white and the right button (or shift+middle) for black.  When you
119 are playing a bughouse game on an Internet Chess Server, a list of the
120 offboard pieces that each player has available is shown in the window
121 title after the player's name; in addition, the piece menus show the
122 number of pieces available of each type.
123
124 All other XBoard commands are available from the menu bar. The most
125 frequently used commands also have shortcut keys or on-screen buttons.
126
127 When XBoard is iconized, its graphical icon is a white knight if
128 it is White's turn to move, a black knight if it is Black's turn.  See
129 Iconize in @ref{Keys} below if you have problems getting this
130 feature to work.
131
132 @menu
133 * File Menu::       Accessing external games and positions.
134 * Mode Menu::       Selecting XBoard's mode.
135 * Action Menu::     Talking to the chess engine or ICS opponents.
136 * Step Menu::       Controlling the game.
137 * Options Menu::    User preferences.
138 * Help Menu::       Getting help.
139 * Keys::            Other shortcut keys.
140 @end menu
141
142 @node File Menu
143 @section File Menu
144 @cindex File Menu
145 @cindex Menu, File
146 @table @asis
147 @item Reset
148 @cindex Reset, Menu Item
149 Resets XBoard and the chess engine to the beginning of a new chess
150 game. The @kbd{r} key is a keyboard equivalent. In Internet Chess
151 Server mode, clears the current state of XBoard, then
152 resynchronizes with the ICS by sending a refresh command. If you want to
153 stop playing, observing, or examining an ICS game, use an
154 appropriate command from the Action menu, not @samp{Reset}.
155 @xref{Action Menu}.
156 @item Load Game
157 @cindex Load Game, Menu Item
158 Plays a game from a record file. The @kbd{g} key is a keyboard equivalent.
159 A popup dialog prompts you for the file name. If the file contains more
160 than one game, a second popup dialog
161 displays a list of games (with information drawn from their PGN tags, if
162 any), and you can select the one you want. Alternatively, you can load the
163 Nth game in the file directly, by typing the number @kbd{N} after the
164 file name, separated by a space.
165
166 The game file parser will accept PGN (portable game notation),
167 or in fact almost any file that contains moves in algebraic
168 notation. 
169 Notation of the form @samp{P@@f7}
170 is accepted for piece-drops in bughouse games;
171 this is a nonstandard extension to PGN.
172 If the file includes a PGN position (FEN tag), or an old-style
173 XBoard position diagram bracketed by @samp{[--} and @samp{--]}
174 before the first move, the game starts from that position. Text
175 enclosed in parentheses, square brackets, or curly braces is assumed to
176 be commentary and is displayed in a pop-up window. Any other
177 text in the file is ignored. PGN variations (enclosed in
178 parentheses) are treated as comments; XBoard is not able to walk
179 variation trees.
180 The nonstandard PGN tag [Variant "varname"] functions similarly to
181 the -variant command-line option (see below), allowing games in certain chess
182 variants to be loaded.  There is also a heuristic to 
183 recognize chess variants from the Event tag, by looking for the strings
184 that the Internet Chess Servers put there when saving variant ("wild") games.
185 @item Load Next Game
186 @cindex Load Next Game, Menu Item
187 Loads the next game from the last game record file you loaded.
188 The shifted @kbd{N} key is a keyboard equivalent.
189 @item Load Previous Game
190 @cindex Load Previous Game, Menu Item
191 Loads the previous game from the last game record file you
192 loaded.  The shifted @kbd{P} key is a keyboard equivalent.
193 Not available if the last game was loaded from a pipe.
194 @item Reload Same Game
195 @cindex Reload Same Game, Menu Item
196 Reloads the last game you loaded.
197 Not available if the last game was loaded from a pipe.
198 @item Save Game
199 @cindex Save Game, Menu Item
200 Appends a record of the current game to a file.
201 A popup dialog
202 prompts you for the file name. If the game did not begin with
203 the standard starting position, the game file includes the
204 starting position used. Games are saved in the PGN (portable
205 game notation) format, unless the oldSaveStyle option is true,
206 in which case they are saved in an older format that is specific
207 to XBoard. Both formats are human-readable, and both can be
208 read back by the @samp{Load Game} command.
209 Notation of the form @samp{P@@f7}
210 is accepted for piece-drops in bughouse games;
211 this is a nonstandard extension to PGN.
212 @item Copy Game
213 @cindex Copy Game, Menu Item
214 Copies a record of the current game to an internal clipboard in PGN
215 format and sets the X selection to the game text.  The game can be
216 pasted to another application (such as a text editor or another copy
217 of XBoard) using that application's paste command.  In many X
218 applications, such as xterm and emacs, the middle mouse button can be
219 used for pasting; in XBoard, you must use the Paste Game command.
220 @item Paste Game
221 @cindex Paste Game, Menu Item
222 Interprets the current X selection as a game record and loads it, as
223 with Load Game.
224 @item Load Position
225 @cindex Load Position, Menu Item
226 Sets up a position from a position file.  A popup dialog prompts
227 you for the file name. If the file contains more than one saved
228 position, and you want to load the Nth one, type the number N
229 after the file name, separated by a space. Position files must
230 be in FEN (Forsythe-Edwards notation), or in the format that the
231 Save Position command writes when oldSaveStyle is turned on.
232 @item Load Next Position
233 @cindex Load Next Position, Menu Item
234 Loads the next position from the last position file you loaded.
235 @item Load Previous Position
236 @cindex Load Previous Position, Menu Item
237 Loads the previous position from the last position file you
238 loaded.  Not available if the last position was loaded from a pipe.
239 @item Reload Same Position
240 @cindex Reload Same Position, Menu Item
241 Reloads the last position you loaded.
242 Not available if the last position was loaded from a pipe.
243 @item Save Position
244 @cindex Save Game, Menu Item
245 Appends a diagram of the current position to a file.
246 A popup dialog
247 prompts you for the file name. Positions are saved in
248 FEN (Forsythe-Edwards notation) format unless the @code{oldSaveStyle}
249 option is true, in which case they are saved in an older,
250 human-readable format that is specific to XBoard. Both formats
251 can be read back by the @samp{Load Position} command.
252 @item Copy Position
253 @cindex Copy Position, Menu Item
254 Copies the current position to an internal clipboard in FEN format and
255 sets the X selection to the position text.  The position can be pasted
256 to another application (such as a text editor or another copy of
257 XBoard) using that application's paste command.  In many X
258 applications, such as xterm and emacs, the middle mouse button can be
259 used for pasting; in XBoard, you must use the Paste Position command.
260 @item Paste Position
261 @cindex Paste Position, Menu Item
262 Interprets the current X selection as a FEN position and loads it, as
263 with Load Position.
264 @item Mail Move
265 @itemx Reload CMail Message
266 @cindex Mail Move, Menu Item
267 @cindex Reload CMail Message, Menu Item
268 See @ref{CMail}.
269 @item Exit
270 @cindex Exit, Menu Item
271 Exits from XBoard. The shifted @kbd{Q} key is a keyboard equivalent.
272 @end table
273
274 @node Mode Menu
275 @section Mode Menu
276 @cindex Menu, Mode
277 @cindex Mode Menu
278 @table @asis
279 @item Machine White
280 @cindex Machine White, Menu Item
281 Tells the chess engine to play White.
282 @item Machine Black
283 @cindex Machine Black, Menu Item
284 Tells the chess engine to play Black.
285 @item Two Machines
286 @cindex Two Machines, Menu Item
287 Plays a game between two chess engines.
288 @item Analysis Mode
289 @cindex Analysis Mode, Menu Item
290 XBoard tells the chess engine to start analyzing the current game/position
291 and shows you the analysis as you move pieces around.
292 Note: Some chess engines do not support Analysis mode.
293
294 To set up a position to analyze, you do the following:
295
296 1. Select Edit Position from the Mode Menu
297
298 2. Set up the position.  Use the middle and right buttons to
299 bring up the white and black piece menus.
300
301 3. When you are finished, click on either the Black or White
302 clock to tell XBoard which side moves first.
303
304 4. Select Analysis Mode from the Mode Menu to start the analysis.
305 @item Analyze File
306 @cindex Analyze File, Menu Item
307 This option lets you load a game from a file (PGN, XBoard format, etc.)
308 and analyze it. When you select this menu item, a popup window appears
309 and asks for a filename to load.
310 If the file contains multiple games, another popup appears that lets
311 you select which game you wish to analyze.
312 After a game is loaded, use the XBoard arrow buttons to step
313 forwards/backwards through the game and watch the analysis.
314 Note: Some chess engines do not support Analysis mode.
315 @item ICS Client
316 @cindex ICS Client, Menu Item
317 This is the normal mode when XBoard
318 is connected to a chess server.  If you have moved into
319 Edit Game or Edit Position mode, you can select this option to get out.
320
321 To use xboard in ICS mode, run it in the foreground with the -ics
322 option, and use the terminal you started it from to type commands and
323 receive text responses from the chess server.  See
324 @ref{Chess Servers} below for more information.
325
326 XBoard activates some special position/game editing features when you
327 use the @kbd{examine} or @kbd{bsetup} commands on ICS and you have
328 @samp{ICS Client} selected on the Mode menu.  First, you can issue the
329 ICS position-editing commands with the mouse.  Move pieces by dragging
330 with mouse button 1.  To drop a new piece on a square, press mouse
331 button 2 or 3 over the square.  This brings up a menu of white pieces
332 (button 2) or black pieces (button 3).  Additional menu choices let
333 you empty the square or clear the board.  Click on the White or Black
334 clock to set the side to play.  You cannot set the side to play or
335 drag pieces to arbitrary squares while examining on ICC, but you can
336 do so in @kbd{bsetup} mode on FICS.  In addition, the menu commands
337 @samp{Forward}, @samp{Backward}, @samp{Pause}, and @samp{Stop Examining}
338 have special functions in this mode; see below.
339 @item Edit Game
340 @cindex Edit Game, Menu Item
341 Allows you to make moves for both Black and White, and to change
342 moves after backing up with the @samp{Backward} command. The clocks do
343 not run.
344
345 In chess engine mode, the chess engine continues to check moves for legality
346 but does not participate in the game. You can bring the chess engine
347 into the game by selecting @samp{Machine White}, @samp{Machine Black},
348 or @samp{Two Machines}.
349
350 In ICS mode, the moves are not sent to the ICS: @samp{Edit Game} takes
351 XBoard out of ICS Client mode and lets you edit games locally.
352 If you want to edit games on ICS in a way that other ICS users
353 can see, use the ICS @kbd{examine} command or start an ICS match
354 against yourself.
355 @item Edit Position
356 @cindex Edit Position, Menu Item
357 Lets you set up an arbitrary board position.
358 Use mouse button 1 to drag pieces to new squares, or to delete a piece
359 by dragging it off the board or dragging an empty square on top of it.
360 To drop a new piece on a square, press mouse button 2 or 3 over the
361 square. This brings up a menu of white pieces (button 2) or
362 black pieces (button 3). Additional menu choices let you empty the
363 square or clear the board. You can set the side to play next by
364 clicking on the word White or Black at the top of the screen.
365 Selecting @samp{Edit Position} causes XBoard to discard
366 all remembered moves in the current game.
367
368 In ICS mode, changes made to the position by @samp{Edit Position} are
369 not sent to the ICS: @samp{Edit Position} takes XBoard out of
370 @samp{ICS Client} mode and lets you edit positions locally. If you want to
371 edit positions on ICS in a way that other ICS users can see, use
372 the ICS @kbd{examine} command, or start an ICS match against yourself.
373 (See also the ICS Client topic above.)
374 @item Training
375 @cindex Training, Menu Item
376 Training mode lets you interactively guess the moves of a game for one
377 of the players. You guess the next move of the game by playing the
378 move on the board. If the move played matches the next move of the
379 game, the move is accepted and the opponent's response is autoplayed.
380 If the move played is incorrect, an error message is displayed.  You
381 can select this mode only while loading a game (that is, after
382 selecting @samp{Load Game} from the File menu).  While XBoard is in 
383 @samp{Training} mode, the navigation buttons are disabled.
384 @item Show Game List
385 @cindex Show Game List, Menu Item
386 Shows or hides the list of games generated by the last @samp{Load Game}
387 command.
388 @item Edit Tags
389 @cindex Edit Tags, Menu Item
390 Lets you edit the PGN (portable game notation)
391 tags for the current game. After editing, the tags must still conform to
392 the PGN tag syntax:
393
394 @example
395 <tag-section> ::= <tag-pair> <tag-section>
396                         <empty>
397 <tag-pair> ::= [ <tag-name> <tag-value> ]
398 <tag-name> ::= <identifier>
399 <tag-value> ::= <string>
400 @end example
401 @noindent
402 See the PGN Standard for full details. Here is an example:
403
404 @example
405 [Event "Portoroz Interzonal"]
406 [Site "Portoroz, Yugoslavia"]
407 [Date "1958.08.16"]
408 [Round "8"]
409 [White "Robert J. Fischer"]
410 [Black "Bent Larsen"]
411 [Result "1-0"]
412 @end example
413 @noindent
414 Any characters that do not match this syntax are silently ignored. Note that
415 the PGN standard requires all games to have at least the seven tags shown
416 above. Any that you omit will be filled in by XBoard
417 with @samp{?} (unknown value), or @samp{-} (inapplicable value).
418 @item Edit Comment
419 @cindex Edit Comment, Menu Item
420 Adds or modifies a comment on the current position. Comments are
421 saved by @samp{Save Game} and are displayed by @samp{Load Game},
422 @samp{Forward}, and @samp{Backward}.
423 @item ICS Input Box
424 @cindex ICS Input Box, Menu Item
425 If this option is set in ICS mode,
426 XBoard
427 creates an extra window that you can use for typing in ICS commands.
428 The input box is especially useful if you want to type in something long or do
429 some editing on your input, because output from ICS doesn't get mixed
430 in with your typing as it would in the main terminal window.
431 @item Pause
432 @cindex Pause, Menu Item
433 Pauses updates to the board, and if you are playing against a chess engine,
434 also pauses your clock. To continue, select @samp{Pause} again, and the
435 display will automatically update to the latest position.
436 The @samp{P} button and keyboard @kbd{p} key are equivalents.
437
438 If you select Pause when you are playing against a chess engine and
439 it is not your move, the chess engine's clock
440 will continue to run and it will eventually make a move, at which point
441 both clocks will stop. Since board updates are paused, however,
442 you will not see the move until you exit from Pause mode (or select Forward).
443 This behavior is meant to simulate adjournment with a sealed move.
444
445 If you select Pause while you are observing or examining a game on a
446 chess server, you can step backward and forward in the current history
447 of the examined game without affecting the other observers and
448 examiners, and without having your display jump forward to the latest
449 position each time a move is made. Select Pause again to reconnect
450 yourself to the current state of the game on ICS.
451
452 If you select @samp{Pause} while you are loading a game, the game stops
453 loading. You can load more moves manually by selecting @samp{Forward}, or
454 resume automatic loading by selecting @samp{Pause} again.
455 @end table
456
457 @node Action Menu
458 @section Action Menu
459 @cindex Menu, Action
460 @cindex Action, Menu
461 @table @asis
462 @item Accept
463 @cindex Accept, Menu Item
464 Accepts a pending match offer. If there is more than one offer
465 pending, you will have to type in a more specific command
466 instead of using this menu choice.
467 @item Decline
468 @cindex Decline, Menu Item
469 Declines a pending offer (match, draw, adjourn, etc.). If there
470 is more than one offer pending, you will have to type in a more
471 specific command instead of using this menu choice.
472 @item Call Flag
473 @cindex Call Flag, Menu Item
474 Calls your opponent's flag, claiming a win on time, or claiming
475 a draw if you are both out of time. You can also call your
476 opponent's flag by clicking on his clock or by pressing the
477 keyboard @kbd{t} key.
478 @item Draw
479 @cindex Draw, Menu Item
480 Offers a draw to your opponent, accepts a pending draw offer
481 from your opponent, or claims a draw by repetition or the 50-move
482 rule, as appropriate. The @kbd{d} key is a keyboard equivalent.
483 @item Adjourn
484 @cindex Adjourn, Menu Item
485 Asks your opponent to agree to adjourning the current game, or
486 agrees to a pending adjournment offer from your opponent.
487 @item Abort
488 @cindex Abort, Menu Item
489 Asks your opponent to agree to aborting the current game, or
490 agrees to a pending abort offer from your opponent. An aborted
491 game ends immediately without affecting either player's rating.
492 @item Resign
493 @cindex Resign, Menu Item
494 Resigns the game to your opponent. The shifted @kbd{R} key is a
495 keyboard equivalent.
496 @item Stop Observing
497 @cindex Stop Observing, Menu Item
498 Ends your participation in observing a game, by issuing the ICS
499 observe command with no arguments. ICS mode only.
500 @item Stop Examining
501 @cindex Stop Examining, Menu Item
502 Ends your participation in examining a game, by issuing the ICS
503 unexamine command. ICS mode only.
504 @end table
505
506 @node Step Menu
507 @section Step Menu
508 @cindex Step Menu
509 @cindex Menu, Step
510 @table @asis
511 @item Backward
512 @cindex Backward, Menu Item
513 @cindex <, Button
514 Steps backward through a series of remembered moves.
515 The @samp{[<]} button and the @kbd{b} key are equivalents.
516 In addition, pressing the Control key steps back one move, and releasing
517 it steps forward again.
518
519 In most modes, @samp{Backward} only lets you look back at old positions;
520 it does not retract moves. This is the case if you are playing against
521 a chess engine, playing or observing a game on an ICS, or loading a game.
522 If you select @samp{Backward} in any of these situations, you will not
523 be allowed to make a different move. Use @samp{Retract Move} or
524 @samp{Edit Game} if you want to change past moves.
525
526 If you are examining an ICS game, the behavior of @samp{Backward}
527 depends on whether XBoard is in Pause mode. If Pause mode is
528 off, @samp{Backward} issues the ICS backward command, which backs up
529 everyone's view of the game and allows you to make a different
530 move. If Pause mode is on, @samp{Backward} only backs up your local
531 view.
532 @item Forward
533 @cindex Forward, Menu Item
534 @cindex >, Button
535 Steps forward through a series of remembered moves (undoing the
536 effect of @samp{Backward}) or forward through a game file. The
537 @samp{[>]} button and the @kbd{f} key are equivalents.
538
539 If you are examining an ICS game, the behavior of Forward
540 depends on whether XBoard is in Pause mode. If Pause mode is
541 off, @samp{Forward} issues the ICS forward command, which moves
542 everyone's view of the game forward along the current line. If
543 Pause mode is on, @samp{Forward} only moves your local view forward,
544 and it will not go past the position that the game was in when
545 you paused.
546 @item Back to Start
547 @cindex Back to Start, Menu Item
548 @cindex <<, Button
549 Jumps backward to the first remembered position in the game.
550 The @samp{[<<]} button and the shifted @kbd{B} key are equivalents.
551
552 In most modes, Back to Start only lets you look back at old
553 positions; it does not retract moves. This is the case if you
554 are playing against a local chess engine, playing or observing a game on
555 a chess server, or loading a game. If you select @samp{Back to Start} in any
556 of these situations, you will not be allowed to make different
557 moves. Use @samp{Retract Move} or @samp{Edit Game} if you want to change past
558 moves; or use Reset to start a new game.
559
560 If you are examining an ICS game, the behavior of @samp{Back to
561 Start} depends on whether XBoard is in Pause mode. If Pause mode
562 is off, @samp{Back to Start} issues the ICS @samp{backward 999999}
563 command, which backs up everyone's view of the game to the start and
564 allows you to make different moves. If Pause mode is on, @samp{Back
565 to Start} only backs up your local view.
566 @item Forward to End
567 @cindex Forward to End, Menu Item
568 @cindex >>, Button
569 Jumps forward to the last remembered position in the game. The
570 @samp{[>>]} button and the shifted @kbd{F} key are equivalents.
571
572 If you are examining an ICS game, the behavior of @samp{Forward to
573 End} depends on whether XBoard is in Pause mode. If Pause mode
574 is off, @samp{Forward to End} issues the ICS @samp{forward 999999}
575 command, which moves everyone's view of the game forward to the end of
576 the current line. If Pause mode is on, @samp{Forward to End} only moves
577 your local view forward, and it will not go past the position
578 that the game was in when you paused.
579 @item Revert
580 @cindex Revert, Menu Item
581 If you are examining an ICS game and Pause mode is off, issues
582 the ICS command @samp{revert}.
583 @item Truncate Game
584 @cindex Truncate Game, Menu Item
585 Discards all remembered moves of the game beyond the current
586 position. Puts XBoard into @samp{Edit Game} mode if it was not there
587 already.
588 @item Move Now
589 @cindex Move Now, Menu Item
590 Forces the chess engine to move immediately. Chess engine mode only.
591 @item Retract Move
592 @cindex Retract Move, Menu Item
593 Retracts your last move. In chess engine mode, you can do this only
594 after the chess engine has replied to your move; if the chess engine is still
595 thinking, use @samp{Move Now} first. In ICS mode, @samp{Retract Move}
596 issues the command @samp{takeback 1} or @samp{takeback 2}
597 depending on whether it is your opponent's move or yours.
598 @end table
599
600 @node Options Menu
601 @section Options Menu
602 @cindex Menu, Options
603 @cindex Options Menu
604 @table @asis
605 @item Always Queen
606 @cindex Always Queen, Menu Item
607 If this option is off, XBoard brings up a dialog
608 box whenever you move a pawn to the last rank, asking what piece
609 you want to promote it to. If the option is true, your pawns are
610 always promoted to queens. Your opponent can still underpromote.
611 @item Animate Dragging
612 @cindex Animate Dragging, Menu Item
613 If Animate Dragging is on, while you are dragging a piece with the
614 mouse, an image of the piece follows the mouse cursor.
615 If Animate Dragging is off, there is no visual feedback while you are
616 dragging a piece, but if Animate Moving is on, the move will be
617 animated when it is complete. 
618 @item Animate Moving
619 @cindex Animate Moving, Menu Item
620 If Animate Moving is on, all piece moves are animated.  An image of the
621 piece is shown moving from the old square to the new square when the
622 move is completed (unless the move was already animated by Animate Dragging).
623 If Animate Moving is off, a moved piece instantly disappears from its
624 old square and reappears on its new square when the move is complete.
625 @item Auto Comment
626 @cindex Auto Comment, Menu Item
627 If this option is on, any remarks made on ICS while you are observing or
628 playing a game are recorded as a comment on the current move.  This includes
629 remarks made with the ICS commands @kbd{say}, @kbd{tell}, @kbd{whisper},
630 and @kbd{kibitz}.
631 Limitation: remarks that you type yourself are not recognized;
632 XBoard scans only the output from ICS, not the input you type to it.
633 @item Auto Flag
634 @cindex Auto Flag, Menu Item
635 If this option is on and one player runs out of time
636 before the other,
637 XBoard
638 will automatically call his flag, claiming a win on time.
639 In ICS mode, Auto Flag will only call your opponent's flag, not yours,
640 and the ICS may award you a draw instead of a win if you have
641 insufficient mating material.  In local chess engine mode,
642 XBoard
643 may call either player's flag and will not take material into account.
644 @item Auto Flip View
645 @cindex Auto Flip View, Menu Item
646 If the Auto Flip View option is on when you start a game, the board
647 will be automatically oriented so that your pawns move from the bottom
648 of the window towards the top.
649 @item Auto Observe
650 @cindex Auto Observe, Menu Item
651 If this option is on and you add a player to your @code{gnotify}
652 list on ICS, XBoard will automatically observe all of that
653 player's games, unless you are doing something else (such as
654 observing or playing a game of your own) when one starts.
655 The games are displayed 
656 from the point of view of the player on your gnotify list; that is, his
657 pawns move from the bottom of the window towards the top.
658 Exceptions:  If both players in a game are on your gnotify list, if
659 your ICS 
660 @code{highlight}
661 variable is set to 0, or if the ICS you are using does not 
662 properly support observing from Black's point of view,
663 you will see the game from White's point of view.
664 @item Auto Raise Board
665 @cindex Auto Raise Board, Menu Item
666 If this option is on, whenever a new game begins, the chessboard window
667 is deiconized (if necessary) and raised to the top of the stack of windows.
668 @item Auto Save
669 @cindex Auto Save, Menu Item
670 If this option is true, at the end of every game XBoard prompts
671 you for a file name and appends a record of the game to the file
672 you specify. 
673 Disabled if the @code{saveGameFile} command-line
674 option is set, as in that case all games are saved to the specified file.
675 @xref{Load and Save options}.
676 @item Blindfold
677 @cindex Blindfold, Menu Item
678 If this option is on, XBoard displays the board as usual but does
679 not display pieces or move highlights.  You can still move in the
680 usual way (with the mouse or by typing moves in ICS mode), even though
681 the pieces are invisible.
682 @item Flash Moves
683 @cindex Flash Moves, Menu Item
684 If this option is on, whenever a move is completed, the moved piece flashes.
685 The number of times to flash is set by the flashCount command-line
686 option; it defaults to 3 if Flash Moves is first turned on from the menu.
687 @item Flip View
688 @cindex Flip View, Menu Item
689 Inverts your view of the chess board for the duration of the
690 current game. Starting a new game returns the board to normal.
691 The @kbd{v} key is a keyboard equivalent.
692
693 If you are playing a game on an ICS, the board is always
694 oriented at the start of the game so that your pawns move from
695 the bottom of the window towards the top. Otherwise, the starting
696 orientation is determined by the @code{flipView} command line option;
697 if it is false (the default), White's pawns move from bottom to top
698 at the start of each game; if it is true, Black's pawns move from
699 bottom to top. @xref{User interface options}.
700 @item Get Move List
701 @cindex Get Move List, Menu Item
702 If this option is on, whenever XBoard
703 receives the first board of a new ICS game (or a different game from
704 the one it is currently displaying), it
705 retrieves the list of past moves from the ICS.
706 You can then review the moves with the @samp{Forward} and @samp{Backward}
707 commands
708 or save them with @samp{Save Game}.  You might want to
709 turn off this option if you are observing several blitz games at once,
710 to keep from wasting time and network bandwidth fetching the move lists over
711 and over.
712 When you turn this option on from the menu, XBoard
713 immediately fetches the move list of the current game (if any).
714 @item Highlight Last Move
715 @cindex Highlight Last Move, Menu Item
716 If Highlight Last Move is on, after a move is made, the starting and
717 ending squares remain highlighted. In addition, after you use Backward
718 or Back to Start, the starting and ending squares of the last move to
719 be unmade are highlighted.
720 @item Move Sound
721 @cindex Move Sound, Menu Item
722 If this option is on, XBoard alerts you by playing a sound
723 after each of your opponent's moves (or after every
724 move if you are observing a game on the Internet Chess Server).
725 The sound is not played after moves you make or moves read from a
726 saved game file. By default, the
727 sound is the terminal bell, but on some systems you can change it
728 to a sound file using the soundMove option; see below.
729
730 If you turn on this option when using XBoard with the Internet
731 Chess Server, you will probably want to give the
732 @kbd{set bell 0}
733 command to the ICS, since otherwise the ICS will ring the terminal bell
734 after every move (not just yours). (The @file{.icsrc} file
735 is a good place for this; see @ref{ICS options}.)
736 @item ICS Alarm
737 @cindex ICS Alarm, Menu Item
738 When this option is on, an alarm sound is played when your clock
739 counts down to the icsAlarmTime (by default, 5 seconds) in an ICS
740 game.  For games with time controls that include an increment, the
741 alarm will sound each time the clock counts down to the icsAlarmTime.
742 By default, the alarm sound is the terminal bell, but on some systems
743 you can change it to a sound file using the soundIcsAlarm option; see
744 below.
745 @item Old Save Style
746 @cindex Old Save Style, Menu Item
747 If this option is off, XBoard saves games in PGN
748 (portable game notation) and positions in FEN (Forsythe-Edwards
749 notation).  If the option is on, a save style that is compatible
750 with older versions of XBoard is used instead.
751 The old position style is more human-readable
752 than FEN; the old game style has no particular advantages.
753 @item Periodic Updates
754 @cindex Periodic Updates, Menu Item
755 If this option is off (or if
756 you are using a chess engine that does not support periodic updates),
757 the analysis window
758 will only be updated when the analysis changes. If this option is
759 on, the Analysis Window will be updated every two seconds.
760 @item Ponder Next Move
761 @cindex Ponder Next Move, Menu Item
762 If this option is off, the chess engine will think only when it is on
763 move.  If the option is on, the engine will also think while waiting
764 for you to make your move.
765 @item Popup Exit Message
766 @cindex Popup Exit Message, Menu Item
767 If this option is on, when XBoard wants to display a message just
768 before exiting, it brings up a modal dialog box and waits for you to
769 click OK before exiting.  If the option is off, XBoard prints the
770 message to standard error (the terminal) and exits immediately.
771 @item Popup Move Errors
772 @cindex Popup Move Errors, Menu Item
773 If this option is off, when you make an error in moving (such as
774 attempting an illegal move or moving the wrong color piece), the
775 error message is displayed in the message area.  If the option is
776 on, move errors are displayed in small popup windows like other errors.
777 You can dismiss an error popup either by clicking its OK button or by
778 clicking anywhere on the board, including downclicking to start a move.
779 @item Premove
780 @cindex Premove, Menu Item
781 If this option is on while playing a game on an ICS, you can register
782 your next planned move before it is your turn.  Move the piece with
783 the mouse in the ordinary way, and the starting and ending squares
784 will be highlighted with a special color (red by default).  When it is
785 your turn, if your registered move is legal, XBoard will send it to
786 ICS immediately; if not, it will be ignored and you can make a
787 different move.  If you change your mind about your premove, either
788 make a different move, or double-click on any piece to cancel the move
789 entirely.
790 @item Quiet Play
791 @cindex Quiet Play, Menu Item
792 If this option is on, XBoard will automatically issue an ICS
793 @kbd{set shout 0}
794 command whenever you start a game and a
795 @kbd{set shout 1}
796 command whenever you finish one.  Thus, you will not be distracted
797 by shouts from other ICS users while playing.
798 @item Show Coords
799 @cindex Show Coords, Menu Item
800 If this option is on, XBoard displays algebraic coordinates
801 along the board's left and bottom edges.
802 @item Show Thinking
803 @cindex Show Thinking, Menu Item
804 If this option is set, the chess engine's notion of the score and best
805 line of play from the current position is displayed as it is
806 thinking. The score indicates how many pawns ahead (or if negative,
807 behind) the chess engine thinks it is. In matches between two
808 machines, the score is prefixed by @samp{W} or @samp{B} to indicate
809 whether it is showing White's thinking or Black's, and only the thinking
810 of the engine that is on move is shown.
811 @item Test Legality
812 @cindex Test Legality, Menu Item
813 If this option is on, XBoard tests whether the moves you try to make
814 with the mouse are legal and refuses to let you make an illegal move.
815 Moves loaded from a file with @samp{Load Game} are also checked.  If
816 the option is off, all moves are accepted, but if a local chess engine
817 or the ICS is active, they will still reject illegal moves.  Turning
818 off this option is useful if you are playing a chess variant with
819 rules that XBoard does not understand.  (Bughouse, suicide, and wild
820 variants where the king may castle after starting on the d file are
821 generally supported with Test Legality on.)
822 @end table
823
824 @node Help Menu
825 @section Help Menu
826 @cindex Menu, Help
827 @cindex Help Menu
828 @table @asis
829 @item Info XBoard
830 @cindex Info XBoard, Menu Item
831 Displays the XBoard documentation in info format.  For this feature to
832 work, you must have the GNU info program installed on your system, and
833 the file @file{xboard.info} must either be present in the current
834 working directory, or have been installed by the @samp{make install}
835 command when you built XBoard.
836 @item Man XBoard
837 @cindex Man XBoard, Menu Item
838 Displays the XBoard documentation in man page format.  For this
839 feature to work, the file @file{xboard.6} must have been installed by
840 the @samp{make install} command when you built XBoard, and the
841 directory it was placed in must be on the search path for your
842 system's @samp{man} command.
843 @item Hint
844 @cindex Hint, Menu Item
845 Displays a move hint from the chess engine.
846 @item Book
847 @cindex Book, Menu Item
848 Displays a list of possible moves from the chess engine's opening
849 book.  The exact format depends on what chess engine you are using.
850 With GNU Chess 4, the first column gives moves, the second column
851 gives one possible response for each move, and the third column shows
852 the number of lines in the book that include the move from the first
853 column. If you select this option and nothing happens, the chess
854 engine is out of its book or does not support this feature.
855 @item About XBoard
856 @cindex About XBoard, Menu Item
857 Shows the current XBoard version number.
858 @end table
859
860 @node Keys
861 @section Other Shortcut Keys
862 @cindex Keys
863 @cindex Shortcut keys
864 @table @asis
865 @item Iconize
866 Pressing the @kbd{i} or @kbd{c} key iconizes XBoard. The graphical
867 icon displays a white knight if it is White's move, or a black knight
868 if it is Black's move. If your X window manager displays only text icons,
869 not graphical ones, check its documentation; there is probably a way to
870 enable graphical icons. If you are running the Motif window manager
871 @file{mwm}, add these lines to your @file{.Xdefaults} file and
872 restart mwm:
873
874 @example
875 Mwm*iconDecoration: activelabel label image
876 Mwm*XBoard*iconImageBackground: White
877 Mwm*XBoard*iconImageForeground: Black
878 @end example
879 @noindent
880 The first line above enables graphical icons in mwm; you don't need it
881 if you already have them. The next two lines force the white knights to
882 come out white and the black knights black. Unfortunately these resources
883 can't be set from inside XBoard; you have to set them in your
884 @file{.Xdefaults} file.
885 @end table
886
887 You can add or remove shortcut keys using the X resources
888 @code{form.translations}. Here is an example of what would go in your
889 @file{.Xdefaults} file:
890
891 @example
892 XBoard*form.translations: \
893   Shift<Key>?: AboutGameProc() \n\
894   <Key>y: AcceptProc() \n\
895   <Key>n: DeclineProc() \n\
896   <Key>i: NothingProc()
897 @end example
898 @noindent
899 Binding a key to @code{NothingProc} makes it do nothing, thus removing
900 it as a shortcut key. The XBoard commands that can be bound to keys
901 are:
902
903 @example
904 AbortProc, AboutGameProc, AboutProc, AcceptProc, AdjournProc,
905 AlwaysQueenProc, AnalysisModeProc, AnalyzeFileProc,
906 AnimateDraggingProc, AnimateMovingProc, AutobsProc, AutoflagProc,
907 AutoflipProc, AutoraiseProc, AutosaveProc, BackwardProc,
908 BlindfoldProc, BookProc, CallFlagProc, CopyGameProc, CopyPositionProc,
909 DebugProc, DeclineProc, DrawProc, EditCommentProc, EditGameProc,
910 EditPositionProc, EditTagsProc, EnterKeyProc, FlashMovesProc,
911 FlipViewProc, ForwardProc, GetMoveListProc, HighlightLastMoveProc,
912 HintProc, Iconify, IcsAlarmProc, IcsClientProc, IcsInputBoxProc,
913 InfoProc, LoadGameProc, LoadNextGameProc, LoadNextPositionProc,
914 LoadPositionProc, LoadPrevGameProc, LoadPrevPositionProc,
915 LoadSelectedProc, MachineBlackProc, MachineWhiteProc, MailMoveProc,
916 ManProc, MoveNowProc, MoveSoundProc, NothingProc, OldSaveStyleProc,
917 PasteGameProc, PastePositionProc, PauseProc, PeriodicUpdatesProc,
918 PonderNextMoveProc, PopupExitMessageProc, PopupMoveErrorsProc,
919 PremoveProc, QuietPlayProc, QuitProc, ReloadCmailMsgProc,
920 ReloadGameProc, ReloadPositionProc, RematchProc, ResetProc,
921 ResignProc, RetractMoveProc, RevertProc, SaveGameProc,
922 SavePositionProc, ShowCoordsProc, ShowGameListProc, ShowThinkingProc,
923 StopExaminingProc, StopObservingProc, TestLegalityProc, ToEndProc,
924 ToStartProc, TrainingProc, TruncateGameProc, and TwoMachinesProc.
925 @end example
926
927 @node Options
928 @chapter Options
929 @cindex Options
930 @cindex Options
931
932 This section documents the command-line options to XBoard.  You can
933 set these options in two ways: by typing them on the shell command
934 line you use to start XBoard, or by setting them as X resources
935 (typically in your @file{.Xdefaults} file).  Many of the options
936 cannot be changed while XBoard is running; others set the initial
937 state of items that can be changed with the @ref{Options} menu.
938
939 Most of the options have both a long name and a short name. To turn a
940 boolean option on or off from the command line, either give its long
941 name followed by the value true or false
942 (@samp{-longOptionName true}), or give just the short name to turn the
943 option on (@samp{-opt}), or the short name preceded by @samp{x} to
944 turn the option off (@samp{-xopt}). For options that take strings or
945 numbers as values, you can use the long or short option names
946 interchangeably.
947
948 Each option corresponds to an X resource with the same name, so
949 if you like, you can set options in your @file{.Xdefaults} file
950 or in a file named @file{XBoard} in your home directory.
951 For options that have two names, the longer one is the name of
952 the corresponding X resource; the short name is not recognized.
953 To turn a boolean option on or off as an
954 X resource, give its long name followed by the value
955 true or false (@samp{XBoard*longOptionName: true}).
956
957 @menu
958 * Chess engine options::        Controlling the chess engine.
959 * ICS options::                 Connecting to and using ICS.
960 * Load and Save options::       Input/output options.
961 * User interface options::      Look and feel options.
962 * Other options::               Miscellaneous.
963 @end menu
964
965 @node Chess engine options
966 @section Chess Engine Options
967 @cindex options, Chess engine
968 @cindex Chess engine options
969 @table @asis
970 @item -tc or -timeControl minutes[:seconds]
971 @cindex tc, option
972 @cindex timeControl, option
973 Each player begins with his clock set to the @code{timeControl} period.
974 Default: 5 minutes.
975 The additional options @code{movesPerSession} and @code{timeIncrement}
976 are mutually exclusive.  
977 @item -mps or -movesPerSession moves
978 @cindex mps, option
979 @cindex movesPerSession, option
980 When both players have made @code{movesPerSession} moves, a
981 new @code{timeControl} period is added to both clocks.  Default: 40 moves.
982 @item -inc or -timeIncrement seconds
983 @cindex inc, option
984 @cindex timeIncrement, option
985 If this option is specified, @code{movesPerSession} is ignored.
986 Instead, after each player's move, @code{timeIncrement} seconds are
987 added to his clock.  
988 Use @samp{-inc 0} if you want to require the entire
989 game to be played in one @code{timeControl} period, with no increment.
990 Default: -1, which specifies @code{movesPerSession} mode.
991 @item -clock/-xclock or -clockMode true/false
992 @cindex clock, option
993 @cindex clockMode, option
994 Determines whether or not to display the chess clocks. If clockMode is
995 false, the clocks are not shown, but the side that is to play next
996 is still highlighted. Also, unless @code{searchTime}
997 is set, the chess engine still keeps track of the clock time and uses it to
998 determine how fast to make its moves.
999 @item -st or -searchTime minutes[:seconds]
1000 @cindex st, option
1001 @cindex searchTime, option
1002 Tells the chess engine to spend at most the given amount of time
1003 searching for each of its moves. Without this option, the chess engine
1004 chooses its search time based on the number of moves and amount
1005 of time remaining until the next time control.
1006 Setting this option also sets clockMode to false.
1007 @item -depth or -searchDepth number
1008 @cindex sd, option
1009 @cindex searchDepth, option
1010 Tells the chess engine to look ahead at most the given number of moves
1011 when searching for a move to make. Without this option, the chess
1012 engine chooses its search depth based on the number of moves and
1013 amount of time remaining until the next time control.  With the option,
1014 the engine will cut off its search early if it reaches the specified depth.
1015 @item -thinking/-xthinking or -showThinking true/false
1016 @cindex thinking, option
1017 @cindex showThinking, option
1018 Sets the Show Thinking option. @xref{Options Menu}. Default: false.
1019 @item -ponder/-xponder or -ponderNextMove true/false
1020 @cindex ponder, option
1021 @cindex ponderNextMove, option
1022 Sets the Ponder Next Move menu option. @xref{Options Menu}. Default: true.
1023 @item -mg or -matchGames n
1024 @cindex mg, option
1025 @cindex matchGames, option
1026 Automatically runs an n-game match between two chess engines,
1027 with alternating colors.
1028 If the @code{loadGameFile} or @code{loadPositionFile} option is set,
1029 XBoard
1030 starts each game with the given opening moves or the given position;
1031 otherwise, the games start with the standard initial chess position.
1032 If the @code{saveGameFile} option is set, a move record for the
1033 match is appended to the specified file. If the @code{savePositionFile}
1034 option is set, the final position reached in each game of the match is appended
1035 to the specified file. When the match is over, XBoard
1036 displays the match score and exits. Default: 0 (do not run a match).
1037 @item -mm/-xmm or -matchMode true/false
1038 @cindex mm, option
1039 @cindex matchMode, option
1040 Setting @code{matchMode} to true is equivalent to setting
1041 @code{matchGames} to 1.
1042 @item -fcp or -firstChessProgram program
1043 @cindex fcp, option
1044 @cindex firstChessProgram, option
1045 Name of first chess engine.
1046 Default: @file{gnuchessx}.
1047 @item -scp or -secondChessProgram program
1048 @cindex scp, option
1049 @cindex secondChessProgram, option
1050 Name of second chess engine, if needed.
1051 A second chess engine is started only in Two Machines (match) mode.
1052 Default: @file{gnuchessx}.
1053 @item -fb/-xfb or -firstPlaysBlack true/false
1054 @cindex fb, option
1055 @cindex firstPlaysBlack, option
1056 In games between two chess engines, firstChessProgram normally plays
1057 white.  If this option is true, firstChessProgram plays black.  In a
1058 multi-game match, this option affects the colors only for the first
1059 game; they still alternate in subsequent games.
1060 @item -fh or -firstHost host
1061 @itemx -sh or -secondHost host
1062 @cindex fh, option
1063 @cindex firstHost, option
1064 @cindex sh, option
1065 @cindex secondHost, option
1066 Hosts on which the chess engines are to run. The default for
1067 each is @file{localhost}. If you specify another host, XBoard
1068 uses @file{rsh} to run the chess engine there. (You can substitute a
1069 different remote shell program for rsh using the @code{remoteShell}
1070 option described below.)
1071 @item -fd or -firstDirectory dir
1072 @itemx -sd or -secondDirectory dir
1073 @cindex fd, option
1074 @cindex firstDirectory, option
1075 @cindex sd, option
1076 @cindex secondDirectory, option
1077 Working directories in which the chess engines are to be run.
1078 The default is "", which means to run the chess engine
1079 in the same working directory as XBoard
1080 itself.  (See the CHESSDIR environment variable.)
1081 This option is effective only when the chess engine is being run
1082 on the local host; it does not work if the engine is run remotely
1083 using the -fh or -sh option.
1084 @item -initString string
1085 @itemx -secondInitString string
1086 @cindex initString, option
1087 @cindex secondInitString, option
1088 The string that is sent to initialize each chess engine for a new game.
1089 Default:
1090
1091 @example
1092 new
1093 random
1094 @end example
1095 @noindent
1096 Setting this option from the command line is tricky, because you must
1097 type in real newline characters, including one at the very end.
1098 In most shells you can do this by
1099 entering a @samp{\} character followed by a newline. It is easier to set
1100 the option from your @file{.Xdefaults} file; in that case you can
1101 include the character sequence @samp{\n} in the string, and it will
1102 be converted to a newline.
1103
1104 If you change this option, don't remove the @samp{new} 
1105 command; it is required by all chess engines to
1106 start a new game.
1107
1108 You can remove the @samp{random} command if you like; including it
1109 causes GNU Chess 4 to randomize its move selection slightly so that it
1110 doesn't play the same moves in every game.  Even without
1111 @samp{random}, GNU Chess 4 randomizes its choice of moves from its
1112 opening book.  Many other chess engines ignore this command entirely
1113 and always (or never) randomize.
1114
1115 You can also try adding other commands to the initString; see the
1116 documentation of the chess engine you are using for details.
1117 @item -firstComputerString string
1118 @itemx -secondComputerString string
1119 @cindex firstComputerString, option
1120 @cindex secondComputerString, option
1121 The string that is sent to the chess engine if its opponent is another
1122 computer chess engine.  The default is @samp{computer\n}.  Probably the
1123 only useful alternative is the empty string (@samp{}), which keeps the
1124 engine from knowing that it is playing another computer.
1125 @item -reuse/-xreuse or -reuseFirst true/false
1126 @itemx -reuse2/-xreuse2 or -reuseSecond true/false
1127 @cindex reuse, option
1128 @cindex reuseFirst, option
1129 @cindex reuse2, option
1130 @cindex reuseSecond, option
1131 If the option is false,
1132 XBoard kills off the chess engine after every game and starts
1133 it again for the next game.  
1134 If the option is true (the default), 
1135 XBoard starts the chess engine only once
1136 and uses it repeatedly to play multiple games.
1137 Some old chess engines may not work properly when
1138 reuse is turned on, but otherwise games will start faster if it is left on.
1139 @item -firstProtocolVersion version-number
1140 @itemx -secondProtocolVersion version-number
1141 @cindex firstProtocolVersion, option
1142 @cindex secondProtocolVersion, option
1143 This option specifies which version of the chess engine communication
1144 protocol to use.  By default, version-number is 2.  In version 1, the
1145 "protover" command is not sent to the engine; since version 1 is a
1146 subset of version 2, nothing else changes.  Other values for
1147 version-number are not supported.
1148 @end table
1149
1150 @node ICS options
1151 @section Internet Chess Server Options
1152 @cindex ICS options
1153 @cindex Options, ICS
1154 @table @asis
1155 @item -ics/-xics or -internetChessServerMode true/false
1156 @cindex ics, option
1157 @cindex internetChessServerMode, option
1158 Connect with an Internet Chess Server to play chess against its
1159 other users, observe games they are playing, or review games
1160 that have recently finished. Default: false.
1161 @item -icshost or -internetChessServerHost host
1162 @cindex icshost, option
1163 @cindex internetChessServerHost, option
1164 The Internet host name or address of the chess server to connect
1165 to when in ICS mode. Default: @code{chessclub.com}.
1166 Another popular chess server to try is @code{freechess.org}.
1167 If your site doesn't have a working Internet name server, try
1168 specifying the host address in numeric form. 
1169 You may also need
1170 to specify the numeric address when using the icshelper option
1171 with timestamp or timeseal (see below).
1172 @item -icsport or -internetChessServerPort port-number
1173 @cindex icsport, option
1174 @cindex internetChessServerPort, option
1175 The port number to use when connecting to a chess server in ICS
1176 mode. Default: 5000.
1177 @item -icshelper or -internetChessServerHelper prog-name
1178 @cindex icshelper, option
1179 @cindex internetChessServerHelper, option
1180 An external helper program used to communicate with the chess server.
1181 You would set it to "timestamp" for ICC (chessclub.com) or
1182 "timeseal" for FICS (freechess.org), after
1183 obtaining the correct version of timestamp or timeseal for your
1184 computer.  See "help timestamp" on ICC and "help timeseal" on FICS.
1185 This option is shorthand for @code{-useTelnet -telnetProgram program}.
1186 @item -telnet/-xtelnet or -useTelnet true/false
1187 @cindex telnet, option
1188 @cindex useTelnet, option
1189 This option is poorly named; it should be called useHelper.
1190 If set to true, it instructs XBoard to run an external
1191 program to communicate with the Internet Chess Server. 
1192 The program to use is given by the telnetProgram option.
1193 If the option is
1194 false (the default), XBoard opens a TCP socket and uses its own
1195 internal implementation of the telnet protocol to communicate with the
1196 ICS. @xref{Firewalls}.
1197 @item -telnetProgram prog-name
1198 @cindex telnetProgram, option
1199 This option is poorly named; it should be called helperProgram.
1200 It gives the name of the telnet program to be used with
1201 the @code{gateway} and @code{useTelnet} options.  The default is
1202 @file{telnet}. The telnet program is invoked with the value of
1203 @code{internetChessServerHost} as its first argument and the value
1204 of @code{internetChessServerPort} as its second argument.
1205 @xref{Firewalls}.
1206 @item -gateway host-name
1207 @cindex gateway, option
1208 If this option is set to a host name, XBoard communicates with the
1209 Internet Chess Server by using @file{rsh} to run
1210 the @code{telnetProgram} on the given host,
1211 instead of using its own internal implementation
1212 of the telnet protocol. You can substitute a different remote shell
1213 program for @file{rsh} using the @code{remoteShell} option described below.
1214 @xref{Firewalls}.
1215 @item -internetChessServerCommPort or -icscomm dev-name
1216 @cindex internetChessServerCommPort, option
1217 @cindex icscomm, option
1218 If this option is set, XBoard communicates with the ICS through
1219 the given character I/O device instead of opening a TCP connection.
1220 Use this option if your system does not have any kind of
1221 Internet connection itself (not even a SLIP or PPP connection),
1222 but you do have dialup access (or a hardwired terminal line) to
1223 an Internet service provider from which you can telnet to the ICS.
1224
1225 The support for this option in XBoard is minimal. You need to
1226 set all communication parameters and tty modes before you enter
1227 XBoard.
1228
1229 Use a script something like this:
1230
1231 @example
1232 stty raw -echo 9600 > /dev/tty00
1233 xboard -ics -icscomm /dev/tty00
1234 @end example
1235
1236 Here replace @samp{/dev/tty00} with the name of the device that your
1237 modem is connected to. You might have to add several more
1238 options to these stty commands. See the man pages for @file{stty}
1239 and @code{tty} if you run into problems. Also, on many systems stty
1240 works on its standard input instead of standard output, so you
1241 have to use @samp{<} instead of @samp{>}.
1242
1243 If you are using linux, try starting with the script below.
1244 Change it as necessary for your installation.
1245
1246 @example
1247 #!/bin/sh -f
1248 # configure modem and fire up XBoard
1249
1250 # configure modem
1251 (
1252   stty 2400 ; stty raw ; stty hupcl ; stty -clocal
1253   stty ignbrk ; stty ignpar ; stty ixon ; stty ixoff
1254   stty -iexten ; stty -echo
1255 ) < /dev/modem
1256 xboard -ics -icscomm /dev/modem
1257 @end example
1258 @noindent
1259 After you start XBoard in this way, type whatever commands are
1260 necessary to dial out to your Internet provider and log in.
1261 Then telnet to ICS, using a command like
1262 @kbd{telnet chessclub.com 5000}.
1263 Important: See the paragraph below about extra echoes, 
1264 in @ref{Limitations}.
1265 @item -icslogon or -internetChessServerLogonScript file-name
1266 @cindex icslogon, option
1267 @cindex internetChessServerLogonScript, option
1268 @cindex .icsrc
1269 Whenever XBoard connects to the Internet Chess Server,
1270 if it finds a file with the name given in this option, it feeds the
1271 file's contents to the ICS as commands. The default file name
1272 is @file{.icsrc}.
1273 Usually the first two lines of the file should be
1274 your ICS user name and password.
1275 The file can be either in $CHESSDIR, in XBoard's working
1276 directory if CHESSDIR is not set, or in your home directory.
1277 @item -msLoginDelay delay
1278 @cindex msLoginDelay, option
1279 If you experience trouble logging on to an ICS when using the
1280 @code{-icslogon} option, inserting some delay between characters
1281 of the logon script may help. This option adds @code{delay}
1282 milliseconds of delay between characters. Good values to try
1283 are 100 and 250.
1284 @item -icsinput/-xicsinput or -internetChessServerInputBox true/false
1285 @cindex icsinput, option
1286 @cindex internetChessServerInputBox, option
1287 Sets the ICS Input Box menu option. @xref{Mode Menu}. Default: false.
1288 @item -autocomm/-xautocomm or -autoComment true/false
1289 @cindex autocomm, option
1290 @cindex autoComment, option
1291 Sets the Auto Comment menu option. @xref{Options Menu}. Default: false.
1292 @item -autoflag/-xautoflag or -autoCallFlag true/false
1293 @cindex autoflag, option
1294 @cindex autoCallFlag, option
1295 Sets the Auto Flag menu option.  @xref{Options Menu}. Default: false.
1296 @item -autobs/-xautobs or -autoObserve true/false
1297 @cindex autobs, option
1298 @cindex autoObserve, option
1299 Sets the Auto Observe menu option.  @xref{Options Menu}. Default: false.
1300 @item -moves/-xmoves or -getMoveList true/false
1301 @cindex moves, option
1302 @cindex getMoveList, option
1303 Sets the Get Move List menu option.  @xref{Options Menu}.  Default: true.
1304 @item -alarm/-xalarm or -icsAlarm true/false
1305 @cindex alarm, option
1306 @cindex icsAlarm, option
1307 Sets the ICS Alarm menu option.  @xref{Options Menu}. Default: true.
1308 @item -icsAlarmTime ms
1309 @cindex icsAlarmTime, option
1310 Sets the time in milliseconds for the ICS Alarm menu option. 
1311 @xref{Options Menu}. Default: 5000.
1312 @item -pre/-xpre \fRor\fB -premove true/false
1313 @cindex pre, option
1314 @cindex premove, option
1315 Sets the Premove menu option. @xref{Options Menu}. Default: true.
1316 @item -quiet/-xquiet or -quietPlay true/false
1317 @cindex quiet, option
1318 @cindex quietPlay, option
1319 Sets the Quiet Play menu option.  @xref{Options Menu}.  Default: false.
1320 @item -colorizeMessages or -colorize
1321 @cindex Colors
1322 @cindex colorize, option
1323 Setting colorizeMessages
1324 to true tells XBoard to colorize the messages received from
1325 the ICS.  Colorization works only if your xterm 
1326 supports ISO 6429 escape sequences for changing text colors.
1327 @item -colorShout foreground,background,bold
1328 @itemx -colorSShout foreground,background,bold
1329 @itemx -colorChannel1 foreground,background,bold
1330 @itemx -colorChannel foreground,background,bold
1331 @itemx -colorKibitz foreground,background,bold
1332 @itemx -colorTell foreground,background,bold
1333 @itemx -colorChallege foreground,background,bold
1334 @itemx -colorRequest foreground,background,bold
1335 @itemx -colorSeek foreground,background,bold
1336 @itemx -colorNormal foreground,background,bold
1337 @cindex Colors
1338 @cindex colorShout, option
1339 @cindex colorSShout, option
1340 @cindex colorChannel1, option
1341 @cindex colorChannel, option
1342 @cindex colorKibitz, option
1343 @cindex colorTell, option
1344 @cindex colorChallenge, option
1345 @cindex colorRequest, option
1346 @cindex colorSeek, option
1347 @cindex colorNormal, option
1348 These options set the colors used when colorizing ICS messages.
1349 All ICS messages are grouped into one of these categories:
1350 shout, sshout, channel 1, other channel, kibitz, tell, challenge, 
1351 request (including abort, adjourn, draw, pause, and takeback), or
1352 normal (all other messages).  
1353
1354 Each foreground or background argument can be one of the following:
1355 black, red, green, yellow, blue, magenta, cyan, white, or default.
1356 Here ``default'' means the default foreground or background color of
1357 your xterm.  Bold can be 1 or 0.  If background is omitted, ``default''
1358 is assumed; if bold is omitted, 0 is assumed.
1359
1360 Here is an example of how to set the colors in your @file{.Xdefaults} file.
1361 The colors shown here are the default values; you will get
1362 them if you turn @code{-colorize} on without specifying your own colors.
1363
1364 @example
1365 xboard*colorizeMessages: true   
1366 xboard*colorShout: green
1367 xboard*colorSShout: green, black, 1
1368 xboard*colorChannel1: cyan
1369 xboard*colorChannel: cyan, black, 1
1370 xboard*colorKibitz: magenta, black, 1
1371 xboard*colorTell: yellow, black, 1
1372 xboard*colorChallenge: red, black, 1
1373 xboard*colorRequest: red
1374 xboard*colorSeek: blue
1375 xboard*colorNormal: default
1376 @end example
1377 @item -soundProgram progname
1378 @cindex soundProgram, option
1379 @cindex Sounds
1380 If this option is set to a sound-playing program that is installed and
1381 working on your system, XBoard can play sound files when certain
1382 events occur, listed below.  The default program name is "play".  If
1383 any of the sound options is set to "$", the event rings the terminal
1384 bell by sending a ^G character to standard output, instead of playing
1385 a sound file.  If an option is set to the empty string "", no sound is
1386 played for that event.
1387 @item -soundShout filename
1388 @itemx -soundSShout filename
1389 @itemx -soundChannel filename
1390 @itemx -soundKibitz filename
1391 @itemx -soundTell filename
1392 @itemx -soundChallenge filename
1393 @itemx -soundRequest filename
1394 @itemx -soundSeek filename
1395 @cindex soundShout, option
1396 @cindex soundSShout, option
1397 @cindex soundChannel, option
1398 @cindex soundKibitz, option
1399 @cindex soundTell, option
1400 @cindex soundChallenge, option
1401 @cindex soundRequest, option
1402 @cindex soundSeek, option
1403 These sounds are triggered in the same way as the colorization events
1404 described above.  They all default to "", no sound.  They are played
1405 only if the colorizeMessages is on.
1406 @item -soundMove filename
1407 @cindex soundMove, option
1408 This sound is used by the Move Sound menu option.  Default: "$".
1409 @item -soundIcsAlarm filename
1410 @cindex soundIcsAlarm, option
1411 This sound is used by the ICS Alarm menu option.  Default: "$".
1412 @item -soundIcsWin filename
1413 @cindex soundIcsWin, option
1414 This sound is played when you win an ICS game.  Default: "" (no sound).
1415 @item -soundIcsLoss filename
1416 @cindex soundIcsLoss, option
1417 This sound is played when you lose an ICS game.  Default: "" (no sound).
1418 @item -soundIcsDraw filename
1419 @cindex soundIcsDraw, option
1420 This sound is played when you draw an ICS game.  Default: "" (no sound).
1421 @item -soundIcsUnfinished filename
1422 @cindex soundIcsUnfinished, option
1423 This sound is played when an ICS game that you are participating in is
1424 aborted, adjourned, or otherwise ends inconclusively.  Default: "" (no
1425 sound).
1426
1427 Here is an example of how to set the sounds in your .Xdefaults file:
1428
1429 @example
1430 xboard*soundShout: shout.wav
1431 xboard*soundSShout: sshout.wav
1432 xboard*soundChannel1: channel1.wav
1433 xboard*soundChannel: channel.wav
1434 xboard*soundKibitz: kibitz.wav
1435 xboard*soundTell: tell.wav
1436 xboard*soundChallenge: challenge.wav
1437 xboard*soundRequest: request.wav
1438 xboard*soundSeek: seek.wav
1439 xboard*soundMove: move.wav
1440 xboard*soundIcsWin: win.wav
1441 xboard*soundIcsLoss: lose.wav
1442 xboard*soundIcsDraw: draw.wav
1443 xboard*soundIcsUnfinished: unfinished.wav
1444 xboard*soundIcsAlarm: alarm.wav
1445 @end example
1446 @end table
1447
1448 @node Load and Save options
1449 @section Load and Save Options
1450 @cindex Options, Load and Save
1451 @cindex Load and Save options
1452 @table @asis
1453 @item -lgf or -loadGameFile file
1454 @itemx -lgi or -loadGameIndex index
1455 @cindex lgf, option
1456 @cindex loadGameFile, option
1457 @cindex lgi, option
1458 @cindex loadGameIndex, option
1459 If the @code{loadGameFile} option is set, XBoard loads the specified
1460 game file at startup. The file name @file{-} specifies the standard
1461 input. If there is more than one game in the file, XBoard
1462 pops up a menu of the available games, with entries based on their PGN 
1463 (Portable Game Notation) tags.
1464 If the @code{loadGameIndex} option is set to @samp{N}, the menu is suppressed
1465 and the N th game found in the file is loaded immediately.
1466 The menu is also suppressed if @code{matchMode} is enabled or if the game file
1467 is a pipe; in these cases the first game in the file is loaded immediately.
1468 Use the @file{pxboard} shell script provided with XBoard if you
1469 want to pipe in files containing multiple games and still see the menu.
1470 @item -td or -timeDelay seconds
1471 @cindex td, option
1472 @cindex timeDelay, option
1473 Time delay between moves during @samp{Load Game}. Fractional seconds
1474 are allowed; try @samp{-td 0.4}. A time delay value of -1 tells
1475 XBoard not to step through game files automatically. Default: 1
1476 second.
1477 @item -sgf or -saveGameFile file
1478 @cindex sgf, option
1479 @cindex saveGameFile, option
1480 If this option is set, XBoard appends a record of every game
1481 played to the specified file. The file name @file{-} specifies the
1482 standard output.
1483 @item -autosave/-xautosave or -autoSaveGames true/false
1484 @cindex autosave, option
1485 @cindex autoSaveGames, option
1486 Sets the Auto Save menu option.  @xref{Options Menu}.  Default: false.
1487 Ignored if @code{saveGameFile} is set.
1488 @item -lpf or -loadPositionFile file
1489 @itemx -lpi or -loadPositionIndex index
1490 @cindex lpf, option
1491 @cindex loadPositionFile, option
1492 @cindex lpi, option
1493 @cindex loadPositionIndex, option
1494 If the @code{loadPositionFile} option is set, XBoard loads the
1495 specified position file at startup. The file name @file{-} specifies the
1496 standard input. If the @code{loadPositionIndex} option is set to N,
1497 the Nth position found in the file is loaded; otherwise the
1498 first position is loaded.
1499 @item -spf or -savePositionFile file
1500 @cindex spf, option
1501 @cindex savePositionFile, option
1502 If this option is set, XBoard appends the final position reached
1503 in every game played to the specified file. The file name @file{-}
1504 specifies the standard output.
1505 @item -oldsave/-xoldsave or -oldSaveStyle true/false
1506 @cindex oldsave, option
1507 @cindex oldSaveStyle, option
1508 Sets the Old Save Style menu option.  @xref{Options Menu}.  Default: false.
1509 @end table
1510
1511 @node User interface options
1512 @section User Interface Options
1513 @cindex User interface options
1514 @cindex Options, User interface
1515 @table @asis
1516 @item -display
1517 @itemx -geometry
1518 @itemx -iconic
1519 @cindex display, option
1520 @cindex geometry, option
1521 @cindex iconic, option
1522 These and most other standard Xt options are accepted.
1523 @item -movesound/-xmovesound or -ringBellAfterMoves true/false
1524 @cindex movesound, option
1525 @cindex bell, option
1526 @cindex ringBellAfterMoves, option
1527 Sets the Move Sound menu option.  @xref{Options Menu}.  Default: false.
1528 For compatibility with old XBoard versions, -bell/-xbell are also 
1529 accepted as abbreviations for this option.
1530 @item -exit/-xexit or -popupExitMessage true/false
1531 @cindex exit, option
1532 @cindex popupExitMessage, option
1533 Sets the Popup Exit Message menu option.  @xref{Options Menu}. Default: true.
1534 @item -popup/-xpopup or -popupMoveErrors true/false
1535 @cindex popup, option
1536 @cindex popupMoveErrors, option
1537 Sets the Popup Move Errors menu option.  @xref{Options Menu}. Default: false.
1538 @item -queen/-xqueen or -alwaysPromoteToQueen true/false
1539 @cindex queen, option
1540 @cindex alwaysPromoteToQueen, option
1541 Sets the Always Queen menu option.  @xref{Options Menu}.  Default: false.
1542 @item -legal/-xlegal or -testLegality true/false
1543 @cindex legal, option
1544 @cindex testLegality, option
1545 Sets the Test Legality menu option.  @xref{Options Menu}.  Default: true.
1546 @item -size or -boardSize (sizeName | n1,n2,n3,n4,n5,n6,n7)
1547 @cindex size, option
1548 @cindex boardSize, option
1549 @cindex board size
1550 Determines how large the board will be, by selecting the pixel size
1551 of the pieces and setting a few related parameters.
1552 The sizeName can be one of: Titanic, giving 129x129 pixel pieces,
1553 Colossal 116x116, Giant 108x108, Huge 95x95, Big 87x87, Large 80x80, Bulky 72x72,
1554 Medium 64x64, Moderate 58x58, Average 54x54, Middling 49x49, Mediocre
1555 45x45, Small 40x40, Slim 37x37, Petite 33x33, Dinky 29x29, Teeny 25x25,
1556 or Tiny 21x21.
1557 Pieces of all these sizes are built into XBoard.
1558 Other sizes can
1559 be used if you have them; see the pixmapDirectory and bitmapDirectory
1560 options.
1561 The default depends on the size of your screen; it is approximately the
1562 largest size that will fit without clipping.
1563
1564 You can select other sizes or vary other layout parameters by providing
1565 a list of comma-separated values (with no spaces) as the argument.
1566 You do not need to provide all the values; for any you omit from the
1567 end of the list, defaults are taken from the nearest built-in size.
1568 The value @code{n1} gives the piece size, @code{n2} the width of the
1569 black border
1570 between squares, @code{n3} the desired size for the 
1571 clockFont, @code{n4} the desired size for the coordFont,
1572 @code{n5} the desired size for the default font,
1573 @code{n6} the smallLayout flag (0 or 1), 
1574 and @code{n7} the tinyLayout flag (0 or 1).  
1575 All dimensions are in pixels.
1576 If the border between squares is eliminated (0 width), the various
1577 highlight options will not work, as there is nowhere to draw the highlight.
1578 If smallLayout is 1 and @code{titleInWindow} is true, 
1579 the window layout is rearranged to make more room for the title.
1580 If tinyLayout is 1, the labels on the menu bar are abbreviated
1581 to one character each and the buttons in the button bar are made narrower.
1582 @item -coords/-xcoords or -showCoords true/false
1583 @cindex coords, option
1584 @cindex showCoords, option
1585 Sets the Show Coords menu option.  @xref{Options Menu}.  Default: false.
1586 The @code{coordFont} option specifies what font to use.
1587 @item -autoraise/-xautoraise or -autoRaiseBoard true/false
1588 @cindex autoraise, option
1589 @cindex autoRaiseBoard, option
1590 Sets the Auto Raise Board menu option.  @xref{Options Menu}.  Default: true.
1591 @item -autoflip/-xautoflip or -autoFlipView true/false
1592 @cindex autoflip, option
1593 @cindex autoFlipView, option
1594 Sets the Auto Flip View menu option.  @xref{Options Menu}.  Default: true.
1595 @item -flip/-xflip or -flipView true/false
1596 @cindex flip, option
1597 @cindex flipView, option
1598 If Auto Flip View is not set, or if you are observing but not participating
1599 in a game, then the positioning of the board at the start of each game
1600 depends on the flipView option.  If flipView is false (the default),
1601 the board is positioned so that the white pawns move from the bottom to the
1602 top; if true, the black pawns move from the bottom to the top.
1603 In any case, the Flip menu option (see @ref{Options Menu})
1604 can be used to flip the board after
1605 the game starts.
1606 @item -title/-xtitle or -titleInWindow true/false
1607 @cindex title, option
1608 @cindex titleInWindow, option
1609 If this option is true, XBoard displays player names (for ICS
1610 games) and game file names (for @samp{Load Game}) inside its main
1611 window. If the option is false (the default), this information is
1612 displayed only in the window banner. You probably won't want to
1613 set this option unless the information is not showing up in the
1614 banner, as happens with a few X window managers.
1615 @item -buttons/-xbuttons or -showButtonBar True/False
1616 @cindex buttons, option
1617 @cindex showButtonBar, option
1618 If this option is False, xboard omits the [<<] [<] [P] [>] [>>] button
1619 bar from the window, allowing the message line to be wider.  You can
1620 still get the functions of these buttons using the menus or their keyboard
1621 shortcuts.  Default: true.
1622 @item -mono/-xmono or -monoMode true/false
1623 @cindex mono, option
1624 @cindex monoMode, option
1625 Determines whether XBoard displays its pieces and squares with
1626 two colors (true) or four (false). You shouldn't have to
1627 specify @code{monoMode}; XBoard will determine if it is necessary.
1628 @item -flashCount count
1629 @itemx -flashRate rate
1630 @itemx -flash/-xflash
1631 @cindex flashCount, option
1632 @cindex flashRate, option
1633 @cindex flash, option
1634 @cindex xflash, option
1635 These options enable flashing of pieces when they
1636 land on their destination square.
1637 @code{flashCount}
1638 tells XBoard how many times to flash a piece after it
1639 lands on its destination square.
1640 @code{flashRate}
1641 controls the rate of flashing (flashes/sec).
1642 Abbreviations:
1643 @code{flash}
1644 sets flashCount to 3.
1645 @code{xflash}
1646 sets flashCount to 0.
1647 Defaults:  flashCount=0 (no flashing), flashRate=5.
1648 @item -highlight/-xhighlight or -highlightLastMove true/false
1649 @cindex highlight, option
1650 @cindex highlightLastMove, option
1651 Sets the Highlight Last Move menu option. @xref{Options Menu}. Default: false.
1652 @item -blind/-xblind or -blindfold true/false
1653 @cindex blind, option
1654 @cindex blindfold, option
1655 Sets the Blindfold menu option.  @xref{Options Menu}.  Default: false.
1656 @item -clockFont font
1657 @cindex clockFont, option
1658 @cindex Font, clock
1659 The font used for the clocks. If the option value is a pattern
1660 that does not specify the font size, XBoard tries to choose an
1661 appropriate font for the board size being used.
1662 Default: -*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*.
1663 @item -coordFont font
1664 @cindex coordFont, option
1665 @cindex Font, coordinates
1666 The font used for rank and file coordinate labels if @code{showCoords}
1667 is true. If the option value is a pattern that does not specify
1668 the font size, XBoard tries to choose an appropriate font for
1669 the board size being used.
1670 Default: -*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*.
1671 @item -font font
1672 @cindex font, option
1673 @cindex Font
1674 The font used for popup dialogs, menus, comments, etc.
1675 If the option value is a pattern that does not specify
1676 the font size, XBoard tries to choose an appropriate font for
1677 the board size being used.
1678 Default: -*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*.
1679 @item -fontSizeTolerance tol
1680 @cindex fontSizeTolerance, option
1681 In the font selection algorithm, a nonscalable font will be preferred
1682 over a scalable font if the nonscalable font's size differs
1683 by @code{tol} pixels
1684 or less from the desired size.  A value of -1 will force
1685 a scalable font to always be used if available; a value of 0 will
1686 use a nonscalable font only if it is exactly the right size; 
1687 a large value (say 1000) will force a nonscalable font to always be
1688 used if available.  Default: 4.
1689 @item -bm or -bitmapDirectory dir
1690 @itemx -pixmap or -pixmapDirectory dir
1691 @cindex bm, option
1692 @cindex bitmapDirectory, option
1693 @cindex pixmap, option
1694 @cindex pixmapDirectory, option
1695 These options control what piece images xboard uses.  The XBoard
1696 distribution includes one set of pixmap pieces in xpm format, in the
1697 directory @file{pixmaps}, and one set of bitmap pieces in xbm format,
1698 in the directory @file{bitmaps}.  Pixmap
1699 pieces give a better appearance on the screen: the white pieces have
1700 dark borders, and the black pieces have opaque internal details.  With
1701 bitmaps, neither piece color has a border, and the internal details
1702 are transparent; you see the square color or other background color
1703 through them.
1704
1705 If XBoard is configured and compiled on a system that includes libXpm,
1706 the X pixmap library, the xpm pixmap pieces are compiled in as the
1707 default.  A different xpm piece set can be selected at runtime with
1708 the @code{pixmapDirectory} option, or a bitmap piece set can be selected
1709 with the @code{bitmapDirectory} option.
1710
1711 If XBoard is configured and compiled on a system that does not include
1712 libXpm (or the @code{--disable-xpm} option is given to the configure
1713 program), the bitmap pieces are compiled in as the default.  It is not
1714 possible to use xpm pieces in this case, but pixmap pieces in another
1715 format called "xim" can be used by giving the @code{pixmapDirectory} option.
1716 Or again, a different bitmap piece set can be selected with the
1717 @code{bitmapDirectory} option.
1718
1719 Files in the @code{bitmapDirectory} must be named as follows:
1720 The first character of a piece bitmap name gives the piece it 
1721 represents (@samp{p}, @samp{n}, @samp{b}, @samp{r}, @samp{q}, or @samp{k}),
1722 the next characters give the size in pixels, the
1723 following character indicates whether the piece is
1724 solid or outline (@samp{s} or @samp{o}),
1725 and the extension is @samp{.bm}.
1726 For example, a solid 80x80 knight would be named @file{n80s.bm}.
1727 The outline bitmaps are used only in monochrome mode.
1728 If bitmap pieces are compiled in and the bitmapDirectory is missing
1729 some files, the compiled in pieces are used instead.
1730
1731 If the bitmapDirectory option is given,
1732 it is also possible to replace xboard's icons and menu checkmark,
1733 by supplying files named @file{icon_white.bm}, @file{icon_black.bm}, and
1734 @file{checkmark.bm}.
1735
1736 For more information about pixmap pieces and how to get additional
1737 sets, see @ref{zic2xpm} below.
1738 @item -whitePieceColor color
1739 @itemx -blackPieceColor color
1740 @itemx -lightSquareColor color
1741 @itemx -darkSquareColor color
1742 @itemx -highlightSquareColor color
1743 @cindex Colors
1744 @cindex whitePieceColor, option
1745 @cindex blackPieceColor, option
1746 @cindex lightSquareColor, option
1747 @cindex darkSquareColor, option
1748 @cindex highlightSquareColor, option
1749 Colors to use for the pieces, squares, and square highlights.
1750 Defaults:
1751
1752 @example
1753 -whitePieceColor       #FFFFCC
1754 -blackPieceColor       #202020
1755 -lightSquareColor      #C8C365
1756 -darkSquareColor       #77A26D
1757 -highlightSquareColor  #FFFF00
1758 -premoveHighlightColor #FF0000
1759 @end example
1760
1761 On a grayscale monitor you might prefer:
1762
1763 @example
1764 -whitePieceColor       gray100
1765 -blackPieceColor       gray0
1766 -lightSquareColor      gray80
1767 -darkSquareColor       gray60
1768 -highlightSquareColor  gray100
1769 -premoveHighlightColor gray70
1770 @end example
1771 @item -drag/-xdrag or -animateDragging true/false
1772 @cindex drag, option
1773 @cindex animateDragging, option
1774 Sets the Animate Dragging menu option. @xref{Options Menu}.  Default: true.
1775 @item -animate/-xanimate or -animateMoving true/false
1776 @cindex animate, option
1777 @cindex animateMoving, option
1778 Sets the Animate Moving menu option. @xref{Options Menu}.  Default: true.
1779 @item -animateSpeed n
1780 @cindex -animateSpeed, option
1781 Number of milliseconds delay between each animation frame when Animate
1782 Moves is on.
1783 @end table
1784
1785 @node Other options
1786 @section Other Options
1787 @cindex Options, miscellaneous
1788 @table @asis
1789 @item -ncp/-xncp or -noChessProgram true/false
1790 @cindex ncp, option
1791 @cindex noChessProgram, option
1792 If this option is true, XBoard acts as a passive chessboard; it
1793 does not start a chess engine at all. Turning on this option
1794 also turns off clockMode. Default: false.
1795 @item -mode or -initialMode modename
1796 @cindex mode, option
1797 @cindex initalMode, option
1798 If this option is given, XBoard selects the given modename
1799 from the Mode menu after starting and (if applicable) processing the
1800 loadGameFile or loadPositionFile option. Default: "" (no selection). 
1801 Other supported values are 
1802 MachineWhite, MachineBlack, TwoMachines, Analysis, 
1803 AnalyzeFile, EditGame, EditPosition, and Training.
1804 @item -variant varname
1805 @cindex variant, option
1806 Activates preliminary, partial support for playing chess variants
1807 against a local engine or editing variant games.  This flag is not
1808 needed in ICS mode.  Recognized variant names are:
1809
1810 @example
1811 normal        Normal chess
1812 wildcastle    Shuffle chess, king can castle from d file
1813 nocastle      Shuffle chess, no castling allowed
1814 fischerandom  Fischer Random shuffle chess
1815 bughouse      Bughouse, ICC/FICS rules
1816 crazyhouse    Crazyhouse, ICC/FICS rules
1817 losers        Lose all pieces or get mated (ICC wild 17)
1818 suicide       Lose all pieces including king (FICS)
1819 giveaway      Try to have no legal moves (ICC wild 26)
1820 twokings      Weird ICC wild 9
1821 kriegspiel    Opponent's pieces are invisible
1822 atomic        Capturing piece explodes (ICC wild 27)
1823 3check        Win by giving check 3 times (ICC wild 25)
1824 shatranj      An ancient precursor of chess (ICC wild 28)
1825 unknown       Catchall for other unknown variants
1826 @end example
1827
1828 In the shuffle variants, xboard does not shuffle the pieces, but
1829 you can do it by hand using Edit Position.  Some variants are
1830 supported only in ICS mode, including fischerandom, bughouse, and
1831 kriegspiel.  The winning/drawing conditions in crazyhouse (offboard
1832 interposition on mate), losers, suicide, giveaway, atomic, and 3check
1833 are not fully understood.  In crazyhouse, xboard does not yet keep
1834 track of offboard pieces.  Shatranj is unsupported, but it may be
1835 usable if you turn off Test Legality.
1836 @item -debug/-xdebug or -debugMode true/false
1837 @cindex debug, option
1838 @cindex debugMode, option
1839 Turns on debugging printout.
1840 @item -rsh or -remoteShell shell-name
1841 @cindex rsh, option
1842 @cindex remoteShell, option
1843 Name of the command used to run programs remotely. The default
1844 is @file{rsh} or @file{remsh}, determined when XBoard is
1845 configured and compiled.
1846 @item -ruser or -remoteUser user-name
1847 @cindex ruser, option
1848 @cindex remoteUser, option
1849 User name on the remote system when running programs with the
1850 @code{remoteShell}. The default is your local user name.
1851 @end table
1852
1853 @node Chess Servers
1854 @chapter Chess Servers
1855 @cindex ICS
1856 @cindex ICS, addresses
1857 @cindex Internet Chess Server
1858 An @dfn{Internet Chess Server}, or @dfn{ICS}, is a place on the
1859 Internet where people can get together to play chess, watch other
1860 people's games, or just chat.  You can use either @code{telnet} or a
1861 client program like XBoard to connect to the server.  There are
1862 thousands of registered users on the different ICS hosts, and it is
1863 not unusual to meet 200 on both chessclub.com and freechess.org.
1864
1865 Most people can just type @kbd{xboard -ics} to start XBoard as an ICS
1866 client.  Invoking XBoard in this way connects you to the Internet
1867 Chess Club (ICC), a commercial ICS.  You can log in there as a guest
1868 even if you do not have a paid account.  To connect to the largest
1869 Free ICS (FICS), use the command @kbd{xboard -ics -icshost freechess.org}
1870 instead, or substitute a different host name to connect to your
1871 favorite ICS.
1872 For a full description of command-line options that control 
1873 the connection to ICS and change the default values of ICS options, see
1874 @ref{ICS options}.  
1875
1876 While you are running XBoard as an ICS client,
1877 you use the terminal window that you started XBoard from
1878 as a place to type in commands and read information that is
1879 not available on the chessboard.
1880
1881 The first time you need to use the terminal is to enter your login name
1882 and password, if you are a registered player. (You don't need to do
1883 this manually; the @code{icsLogon} option can do it for you.
1884 @pxref{ICS options}.)  If you are not registered, 
1885 enter @kbd{g} as your name, and the server will pick a
1886 unique guest name for you.
1887
1888 Some useful ICS commands
1889 include
1890 @table @kbd
1891 @item help <topic>
1892 @cindex help, ICS command
1893 to get help on the given <topic>. To get a list of possible topics type
1894 @dfn{help} without topic.  Try the help command before you ask other
1895 people on the server for help.
1896
1897 For example @kbd{help register} tells you how to become a registered
1898 ICS player.
1899 @item who <flags>
1900 @cindex who, ICS command
1901 to see a list of people who are logged on.  Administrators
1902 (people you should talk to if you have a problem) are marked
1903 with the character @samp{*}, an asterisk. The <flags> allow you to
1904 display only selected players: For example, @kbd{who of} shows a
1905 list of players who are interested in playing but do not have
1906 an opponent.
1907 @item games
1908 @cindex games, ICS command
1909 to see what games are being played
1910 @item match <player> [<mins>] [<inc>]
1911 to challenge another player to a game. Both opponents get <mins> minutes
1912 for the game, and <inc> seconds will be added after each move.
1913 If another player challenges you, the server asks if you want to
1914 accept the challenge; use the @kbd{accept} or @kbd{decline} commands
1915 to answer.
1916 @item accept
1917 @itemx decline
1918 @cindex accept, ICS command
1919 @cindex decline, ICS command
1920 to accept or decline another player's offer. 
1921 The offer may be to start a new game, or to agree to a 
1922 @kbd{draw}, @kbd{adjourn} or @kbd{abort} the current game. @xref{Action Menu}.
1923
1924 If you have more than one pending offer (for example, if more than one player
1925 is challenging you, or if your opponent offers both a draw and to adjourn the
1926 game), you have to supply additional information, by typing something
1927 like @kbd{accept <player>}, @kbd{accept draw}, or @kbd{draw}.
1928 @item draw
1929 @itemx adjourn
1930 @itemx abort
1931 @cindex draw, ICS command
1932 @cindex adjourn, ICS command
1933 @cindex abort, ICS command
1934 asks your opponent to terminate a game by mutual agreement. Adjourned
1935 games can be continued later. 
1936 Your opponent can either @kbd{decline} your offer or accept it (by typing the
1937 same command or typing @kbd{accept}).  In some cases these commands work
1938 immediately, without asking your opponent to agree.  For example, you can
1939 abort the game unilaterally if your opponent is out of time, and you can claim
1940 a draw by repetition or the 50-move rule if available simply by typing 
1941 @kbd{draw}.
1942 @item finger <player>
1943 @cindex finger, ICS command
1944 to get information about the given <player>. (Default: yourself.)
1945 @item vars
1946 @cindex vars, ICS command
1947 to get a list of personal settings
1948 @item set <var> <value>
1949 @cindex set, ICS command
1950 to modify these settings
1951 @item observe <player>
1952 @cindex observe, ICS command
1953 to observe an ongoing game of the given <player>.
1954 @item examine
1955 @itemx oldmoves
1956 @cindex examine, ICS command
1957 @cindex oldmoves, ICS command
1958 to review a recently completed game
1959 @end table
1960
1961 Some special XBoard features are activated when you are
1962 in examine mode on ICS.  See the descriptions of the menu commands
1963 @samp{Forward}, @samp{Backward}, @samp{Pause}, @samp{ICS Client}, 
1964 and @samp{Stop Examining} on the @ref{Step Menu}, @ref{Mode Menu}, and
1965 @ref{Options Menu}.
1966
1967 @node Firewalls
1968 @chapter Firewalls
1969 By default, XBoard communicates with an Internet Chess Server
1970 by opening a TCP socket directly from the machine it is running on
1971 to the ICS. If there is a firewall between your machine and the ICS,
1972 this won't work. Here are some recipes for getting around common
1973 kinds of firewalls using special options to XBoard.
1974 Important: See the paragraph in the below about extra echoes, in
1975 @ref{Limitations}.
1976
1977 Suppose that you can't telnet directly to ICS, but you can telnet
1978 to a firewall host, log in, and then telnet from there to ICS.
1979 Let's say the firewall is called @samp{firewall.example.com}. Set
1980 command-line options as follows:
1981
1982 @example
1983 xboard -ics -icshost firewall.example.com -icsport 23
1984 @end example
1985 @noindent
1986 Or in your @file{.Xdefaults} file:
1987
1988 @example
1989 XBoard*internetChessServerHost: firewall.example.com
1990 XBoard*internetChessServerPort: 23
1991 @end example
1992 @noindent
1993 Then when you run XBoard in ICS mode, you will be prompted
1994 to log in to the firewall host. This works because port 23 is the
1995 standard telnet login service. Do so, then telnet to ICS, using a
1996 command like @samp{telnet chessclub.com 5000}, or whatever command
1997 the firewall provides for telnetting to port 5000.
1998
1999 If your firewall lets you telnet (or rlogin) to remote hosts but
2000 doesn't let you telnet to port 5000, you may be able to connect to the
2001 chess server on port 23 instead, which is the port the telnet program
2002 uses by default.  Some chess servers support this (including
2003 chessclub.com and freechess.org), while some do not.
2004
2005 If your chess server does not allow connections on port 23 and your
2006 firewall does not allow you to connect to other ports, you may be able
2007 to connect by hopping through another host outside the firewall that
2008 you have an account on.  For instance, suppose you have a shell
2009 account at @samp{foo.edu}. Follow the recipe above, but instead of
2010 typing @samp{telnet chessclub.com 5000} to the firewall, type
2011 @samp{telnet foo.edu} (or @samp{rlogin foo.edu}), log in there, and
2012 then type @samp{telnet chessclub.com 5000}.
2013
2014 Suppose that you can't telnet directly to ICS, but you can use rsh
2015 to run programs on a firewall host, and that host can telnet to ICS.
2016 Let's say the firewall is called @samp{rsh.example.com}. Set
2017 command-line options as follows:
2018
2019 @example
2020 xboard -ics -gateway rsh.example.com -icshost chessclub.com
2021 @end example
2022
2023 @noindent
2024 Or in your @file{.Xdefaults} file:
2025
2026 @example
2027 XBoard*gateway: rsh.example.com
2028 XBoard*internetChessServerHost: chessclub.com
2029 @end example
2030
2031 Then when you run XBoard in ICS mode, it will connect to
2032 the ICS by using @file{rsh} to run the command
2033 @samp{telnet chessclub.com 5000} on host @samp{rsh.example.com}.
2034
2035 Suppose that you can telnet anywhere you want, but you have to
2036 run a special program called @file{ptelnet} to do so.
2037
2038 First, we'll consider the easy case, in which
2039 @samp{ptelnet chessclub.com 5000} gets you to the chess server.
2040 In this case set command line options as follows:
2041
2042 @example
2043 xboard -ics -telnet -telnetProgram ptelnet
2044 @end example
2045
2046 @noindent
2047 Or in your @file{.Xdefaults} file:
2048
2049 @example
2050 XBoard*useTelnet: true
2051 XBoard*telnetProgram: ptelnet
2052 @end example
2053
2054 @noindent
2055 Then when you run XBoard in ICS mode, it will issue the
2056 command @samp{ptelnet chessclub.com 5000} to connect to the ICS.
2057
2058 Next, suppose that @samp{ptelnet chessclub.com 5000} doesn't work;
2059 that is, your @file{ptelnet} program doesn't let you connect to
2060 alternative ports. As noted above, your chess server may allow you to
2061 connect on port 23 instead.  In that case, just add the option
2062 @samp{-icsport ""} to the above command, or add
2063 @samp{XBoard*internetChessServerPort:} to your @file{.Xdefaults} file.
2064 But if your chess server doesn't let you connect on port 23, you will have
2065 to find some other host outside the firewall and hop through it. For
2066 instance, suppose you have a shell account at @samp{foo.edu}. Set
2067 command line options as follows:
2068
2069 @example
2070 xboard -ics -telnet -telnetProgram ptelnet -icshost foo.edu -icsport ""
2071 @end example
2072
2073 @noindent
2074 Or in your @file{.Xdefaults} file:
2075
2076 @example
2077 XBoard*useTelnet: true
2078 XBoard*telnetProgram: ptelnet
2079 XBoard*internetChessServerHost: foo.edu
2080 XBoard*internetChessServerPort:
2081 @end example
2082
2083 @noindent
2084 Then when you run XBoard in ICS mode, it will issue the
2085 command @samp{ptelnet foo.edu} to connect to your account at
2086 @samp{foo.edu}. Log in there, then type @samp{telnet chessclub.com 5000}.
2087
2088 ICC timestamp and FICS timeseal do not work through some
2089 firewalls.  You can use them only if your firewall gives a clean TCP
2090 connection with a full 8-bit wide path.  If your firewall allows you
2091 to get out only by running a special telnet program, you can't use
2092 timestamp or timeseal across it.  But if you have access to a
2093 computer just outside your firewall, and you have much lower netlag
2094 when talking to that computer than to the ICS, it might be worthwhile
2095 running timestamp there.  Follow the instructions above for hopping
2096 through a host outside the firewall (foo.edu in the example),
2097 but run timestamp or timeseal on that host instead of telnet.
2098
2099 Suppose that you have a SOCKS firewall that will give you a clean
2100 8-bit wide TCP connection to the chess server, but only after you
2101 authenticate yourself via the SOCKS protocol.  In that case, you could
2102 make a socksified version of XBoard and run that.  If you are using
2103 timestamp or timeseal, you will to socksify it, not XBoard; this may
2104 be difficult seeing that ICC and FICS do not provide source code for
2105 these programs.  Socksification is beyond the scope of this document,
2106 but see the SOCKS Web site at http://www.socks.permeo.com/.
2107 If you are missing SOCKS, try http://www.funbureau.com/.
2108
2109 @node Environment
2110 @chapter Environment variables
2111 @cindex Environment variables
2112 @cindex CHESSDIR
2113 Game and position files are found in a directory named by the
2114 @code{CHESSDIR} environment variable. If this variable is not set, the
2115 current working directory is used. If @code{CHESSDIR} is set,
2116 XBoard actually changes its working directory to
2117 @code{$CHESSDIR}, so any files written by the chess engine
2118 will be placed there too.
2119
2120 @node Limitations
2121 @chapter Limitations and known bugs
2122 @cindex Limitations
2123 @cindex Bugs
2124 There is no way for two people running copies of XBoard to play
2125 each other without going through an Internet Chess Server.
2126
2127 Under some circumstances, your ICS password may be echoed when you log on.
2128
2129 If you are connecting to the ICS by running telnet on an Internet
2130 provider or firewall host, you may find that each line you type is
2131 echoed back an extra time after you hit @key{Enter}. If your Internet
2132 provider is a Unix system, you can probably turn its echo off by
2133 typing @kbd{stty -echo} after you log in, and/or typing
2134 @key{^E}@key{Enter} (Ctrl+E followed by the Enter key) to the telnet
2135 program after you have logged into ICS.  It is a good idea to do this
2136 if you can, because the extra echo can occasionally confuse XBoard's
2137 parsing routines.
2138
2139 The game parser recognizes only algebraic notation.
2140
2141 The internal move legality tester does not look at the game history,
2142 so in some cases it misses illegal castling or en passant captures.
2143 It permits castling with the king on the d file because this is possible in
2144 some "wild 1" games on ICS.  It does not check
2145 piece drops in bughouse and crazyhouse to see if you actually
2146 hold the piece you are trying to drop.
2147 However, if you attempt an illegal move when using
2148 a chess engine or chess server, XBoard will accept the error message
2149 that comes back, undo the move, and let you try another.
2150
2151 Fischer Random castling is not understood.  You can probably play
2152 Fischer Random successfully on ICS by typing castling moves into the ICS
2153 Interaction window, but they will not be animated correctly, and saved
2154 games will not be loaded correctly if castling occurs.
2155
2156 FEN positions saved by XBoard
2157 never include correct information about whether castling is legal or
2158 how many half-moves have been made since the last irreversible move,
2159 and sometimes may not correctly indicate when en passant capture is available.
2160
2161 The mate detector does not understand that non-contact mate is not
2162 really mate in bughouse and crazyhouse.  The only problem this causes
2163 while playing is minor: a @samp{#} (mate indicator) character will show
2164 up after a non-contact mating move in the move list; XBoard will
2165 not assume the game is over at that point.  However, if you are editing
2166 a game, Edit Game mode will be terminated by a non-contact mate.
2167
2168 The menus may not work if your keyboard is in Caps Lock or Num Lock mode.
2169 This seems to be a problem with the Athena menu widget,
2170 not an XBoard bug.
2171
2172 Also see the ToDo file included with the distribution for many other
2173 possible bugs, limitations, and ideas for improvement that have been
2174 suggested.
2175 @node Problems
2176 @chapter Reporting problems
2177 @cindex Bugs
2178 @cindex Bug reports
2179 @cindex Reporting bugs
2180 @cindex Problems
2181 @cindex Reporting problems
2182
2183 Report bugs and problems with XBoard to @code{<bug-xboard@@gnu.org>}.
2184
2185 Please use the @file{script} program to start a typescript, run 
2186 XBoard with the @samp{-debug} option, and include the typescript
2187 output in your message.
2188 Also tell us what kind of machine and what operating system version
2189 you are using.  The command @samp{uname -a} will often tell you this.
2190 Here is a sample of approximately what you should type:
2191
2192 @example
2193 script
2194 uname -a
2195 ./configure
2196 make
2197 ./xboard -debug
2198 exit
2199 mail bug-xboard@@gnu.org
2200 Subject: Your short description of the problem
2201 Your detailed description of the problem
2202 ~r typescript
2203 .
2204 @end example
2205
2206 If you improve XBoard, please send a message about your changes,
2207 and we will get in touch with you about merging them in
2208 to the main line of development.
2209 Also see our Web site at http://savannah.gnu.org/projects/xboard/.
2210
2211 @node Contributors
2212 @chapter Authors and contributors
2213 @cindex Authors
2214 @cindex Contributors
2215
2216 Tim Mann has been responsible for XBoard versions 1.3 and beyond, and
2217 for WinBoard, a port of XBoard to Microsoft Win32 (Windows NT and
2218 Windows 95).
2219
2220 Mark Williams contributed the initial (WinBoard-only) implementation
2221 of many new features added to both XBoard and WinBoard in version
2222 4.1.0, including copy/paste, premove, icsAlarm, autoFlipView, training
2223 mode, auto raise, and blindfold.  Ben Nye contributed X copy/paste
2224 code for XBoard.
2225
2226 Hugh Fisher added animated piece movement to XBoard, and Henrik Gram
2227 (henrikg@@funcom.com) added it to WinBoard.  Frank McIngvale added
2228 click/click moving, the Analysis modes, piece flashing, ZIICS import,
2229 and ICS text colorization to XBoard.  Jochen Wiedmann ported XBoard to
2230 the Amiga, creating AmyBoard, and converted the documentation to
2231 texinfo.  Elmar Bartel contributed the new piece bitmaps introduced in
2232 version 3.2.  John Chanak contributed the initial implementation of
2233 ICS mode.  The color scheme and the old 80x80 piece bitmaps were taken
2234 from Wayne Christopher's @code{XChess} program.
2235
2236 Chris Sears and Dan Sears wrote the original XBoard.  They were
2237 responsible for versions 1.0 through 1.2.
2238
2239 Evan Welsh wrote @code{CMail}.  Patrick Surry helped in designing,
2240 testing, and documenting CMail.
2241
2242 @node CMail
2243 @chapter CMail
2244 @cindex cmail
2245 The @file{cmail} program can help you play chess by email with opponents of
2246 your choice using XBoard as an interface.
2247
2248 You will usually run @file{cmail} without giving any options.
2249
2250 @menu
2251 * CMail options::    Invoking CMail.
2252 * CMail game::       Starting a CMail game.
2253 * CMail answer::     Answering a move.
2254 * CMail multi::      Multiple games in one message.
2255 * CMail completion:: Completing a game.
2256 * CMail trouble::    Known CMail problems.
2257 @end menu
2258
2259 @node CMail options
2260 @section CMail options
2261 @table @asis
2262 @item -h
2263 Displays @file{cmail} usage information.
2264 @item -c
2265 Shows the conditions of the GNU General Public License.
2266 @xref{Copying}.
2267 @item -w
2268 Shows the warranty notice of the GNU General Public License.
2269 @xref{Copying}.
2270 @item -v
2271 @itemx -xv
2272 Provides or inhibits verbose output from @file{cmail} and XBoard,
2273 useful for debugging. The
2274 @code{-xv}
2275 form also inhibits the cmail introduction message.
2276 @item -mail
2277 @itemx -xmail
2278 Invokes or inhibits the sending of a mail message containing the move.
2279 @item -xboard
2280 @itemx -xxboard
2281 Invokes or inhibits the running of XBoard on the game file.
2282 @item -reuse
2283 @itemx -xreuse
2284 Invokes or inhibits the reuse of an existing XBoard to display the
2285 current game.
2286 @item -remail
2287 Resends the last mail message for that game. This inhibits running
2288 XBoard.
2289 @item -game <name>
2290 The name of the game to be processed.
2291 @item -wgames <number>
2292 @itemx -bgames <number>
2293 @itemx -games <number>
2294 Number of games to start as White, as Black or in total. Default is 1 as
2295 white and none as black. If only one color is specified then none of the
2296 other color is assumed. If no color is specified then equal numbers of
2297 White and Black games are started, with the extra game being as White if an
2298 odd number of total games is specified.
2299 @item -me <short name>
2300 @itemx -opp <short name>
2301 A one-word alias for yourself or your opponent.
2302 @item -wname <full name>
2303 @itemx -bname <full name>
2304 @itemx -name <full name>
2305 @itemx -oppname <full name>
2306 The full name of White, Black, yourself or your opponent.
2307 @item -wna <net address>
2308 @itemx -bna <net address>
2309 @itemx -na <net address>
2310 @itemx -oppna <net address>
2311 The email address of White, Black, yourself or your opponent.
2312 @item -dir <directory>
2313 The directory in which @file{cmail} keeps its files. This defaults to the
2314 environment variable @code{$CMAIL_DIR} or failing that, @code{$CHESSDIR},
2315 @file{$HOME/Chess} or @file{~/Chess}. It will be created if it does not exist.
2316 @item -arcdir <directory>
2317 The directory in which @file{cmail} archives completed games. Defaults to
2318 the environment variable @code{$CMAIL_ARCDIR} or, in its absence, the same
2319 directory as cmail keeps its working files (above).
2320 @item -mailprog <mail program>
2321 The program used by cmail to send email messages. This defaults to the
2322 environment variable @code{$CMAIL_MAILPROG} or failing that
2323 @file{/usr/ucb/Mail}, @file{/usr/ucb/mail} or @file{Mail}. You will need
2324 to set this variable if none of the above paths fit your system.
2325 @item -gamesFile <file>
2326 @cindex .cmailgames
2327 A file containing a list of games with email addresses. This defaults to
2328 the environment variable @code{$CMAIL_GAMES} or failing that
2329 @file{.cmailgames}.
2330 @item -aliasesFile <file>
2331 @cindex .cmailaliases
2332 A file containing one or more aliases for a set of email addresses. This
2333 defaults to the environment variable @code{$CMAIL_ALIASES} or failing
2334 that @file{.cmailaliases}.
2335 @item -logFile <file>
2336 A file in which to dump verbose debugging messages that are invoked with
2337 the @samp{-v}
2338 option.
2339 @item -event <event>
2340 The PGN Event tag (default @samp{Email correspondence game}).
2341 @item -site <site>
2342 The PGN Site tag (default @samp{NET}).
2343 @item -round <round>
2344 The PGN Round tag (default @samp{-}, not applicable).
2345 @item -mode <mode>
2346 The PGN Mode tag (default @samp{EM}, Electronic Mail).
2347 @item Other options
2348 Any option flags not listed above are passed through to XBoard.
2349 Invoking XBoard through CMail changes the default values of two XBoard
2350 options: The default value for @samp{-noChessProgram} is changed to
2351 true; that is, by default no chess engine is started.  The default
2352 value for @samp{-timeDelay} is changed to 0; that is, by default
2353 XBoard immediately goes to the end of the game as played so far,
2354 rather than stepping through the moves one by one.  You can still set
2355 these options to whatever values you prefer by supplying them on
2356 CMail's command line.  @xref{Options}.
2357 @end table
2358
2359 @node CMail game
2360 @section Starting a CMail Game
2361 Type @file{cmail} from a shell to start a game as white. After an opening
2362 message, you will be prompted for a game name, which is optional---if you
2363 simply press @key{Enter}, the game name will take the form
2364 @samp{you-VS-opponent}. You will next be prompted for the short name
2365 of your opponent. If you haven't played this person before, you will also
2366 be prompted for his/her email address. @file{cmail} will then invoke
2367 XBoard in the background. Make your first move and select
2368 @samp{Mail Move} from the @samp{File} menu. @xref{File Menu}. If all is well,
2369 @file{cmail} will mail a copy of the move to your opponent. If you select
2370 @samp{Exit} without having selected @samp{Mail Move} then no move will be
2371 made.
2372
2373 @node CMail answer
2374 @section Answering a Move
2375 When you receive a message from an opponent containing a move in one of
2376 your games, simply pipe the message through @file{cmail}. In some mailers
2377 this is as simple as typing @kbd{| cmail} when viewing the message, while in
2378 others you may have to save the message to a file and do @kbd{cmail < file}
2379 at the command line. In either case @file{cmail} will display the game using
2380 XBoard. If you didn't exit XBoard when you made your first move
2381 then @file{cmail} will do its best to use the existing XBoard instead
2382 of starting a new one. As before, simply make a move and select
2383 @samp{Mail Move} from the @samp{File} menu. @xref{File Menu}. @file{cmail}
2384 will try to use the
2385 XBoard that was most recently used to display the current game. This
2386 means that many games can be in progress simultaneously, each with its own
2387 active XBoard.
2388
2389 If you want to look at the history or explore a variation, go ahead, but
2390 you must return to the current position before XBoard will allow you
2391 to mail a move. If you edit the game's history you must select
2392 @samp{Reload Same Game} from the @samp{File} menu to get back to the original
2393 position, then make the move you want and select @samp{Mail Move}.
2394 As before, if you decide you aren't ready to make a move just yet you can
2395 either select @samp{Exit} without sending a move or just leave
2396 XBoard running until you are ready.
2397
2398 @node CMail multi
2399 @section Multi-Game Messages
2400
2401 It is possible to have a @file{cmail} message carry more than one game.
2402 This feature was implemented to handle IECG (International Email Chess
2403 Group) matches, where a match consists of one game as white and one as black,
2404 with moves transmitted simultaneously. In case there are more general uses,
2405 @file{cmail} itself places no limit on the number of black/white games
2406 contained in a message; however, XBoard does.
2407
2408 @node CMail completion
2409 @section Completing a Game
2410 Because XBoard can detect checkmate and stalemate, @file{cmail}
2411 handles game termination sensibly. As well as resignation, the
2412 @samp{Action} menu allows draws to be offered and accepted for
2413 @file{cmail} games.
2414
2415 For multi-game messages, only unfinished and just-finished games will be
2416 included in email messages. When all the games are finished, they are
2417 archived in the user's archive directory, and similarly in the opponent's
2418 when he or she pipes the final message through @file{cmail}. The archive
2419 file name includes the date the game was started.
2420
2421 @node CMail trouble
2422 @section Known CMail Problems
2423 It's possible that a strange conjunction of conditions may occasionally
2424 mean that @file{cmail} has trouble reactivating an existing
2425 XBoard. If this should happen, simply trying it again should work.
2426 If not, remove the file that stores the XBoard's PID
2427 (@file{game.pid}) or use the @samp{-xreuse} option to force
2428 @file{cmail} to start a new XBoard.
2429
2430 Versions of @file{cmail} after 2.16 no longer understand the old file format
2431 that XBoard used to use and so cannot be used to correspond with
2432 anyone using an older version.
2433
2434 Versions of @file{cmail} older than 2.11 do not handle multi-game messages,
2435 so multi-game correspondence is not possible with opponents using an older
2436 version.
2437
2438 @node Other programs
2439 @chapter Other programs you can use with XBoard
2440 @cindex Other programs
2441
2442 Here are some other programs you can use with XBoard
2443
2444 @menu
2445 * GNU Chess::        The GNU Chess engine.
2446 * Crafty::           The Crafty chess engine.
2447 * zic2xpm::          The program used to import chess sets from ZIICS.
2448 @end menu
2449
2450 @node GNU Chess
2451 @section GNU Chess
2452
2453 The GNU Chess engine is available from:
2454
2455 ftp://ftp.gnu.org/gnu/gnuchess/
2456
2457 You can use XBoard to play a game against GNU Chess, or to
2458 interface GNU Chess to an ICS.
2459
2460 @node Crafty
2461 @section Crafty
2462
2463 Crafty is a chess engine written by Bob Hyatt.
2464 You can use XBoard to play a game against Crafty, hook Crafty up
2465 to an ICS, or use Crafty to interactively analyze games and positions
2466 for you.
2467
2468 Crafty is a strong, rapidly evolving chess program. This rapid
2469 pace of development is good, because it means Crafty is always
2470 getting better.  This can sometimes cause problems with
2471 backwards compatibility, but usually the latest version of Crafty
2472 will work well with the latest version of XBoard.
2473 Crafty can be obtained from its author's FTP site:
2474 ftp://ftp.cis.uab.edu/hyatt/.
2475
2476 To use Crafty with XBoard, give the -fcp and -fd options as follows, where
2477 <crafty's directory> is the directory in which you installed Crafty
2478 and placed its book and other support files.
2479
2480 @node zic2xpm
2481 @section zic2xpm
2482
2483 The ``zic2xpm'' program is used to import chess sets from the ZIICS(*)
2484 program into XBoard. ``zic2xpm'' is part of the XBoard distribution.
2485 ZIICS is available from:
2486
2487 ftp://ftp.freechess.org/pub/chess/DOS/ziics131.exe
2488
2489 To import ZIICS pieces, do this:
2490 @table @asis
2491 @item 1. Unzip ziics131.exe into a directory:
2492
2493 @example
2494 unzip -L ziics131.exe -d ~/ziics
2495 @end example
2496 @item 2. Use zic2xpm to convert a set of pieces to XBoard format.
2497
2498 For example, let's say you want to use the
2499 FRITZ4 set. These files are named ``fritz4.*'' in the ZIICS distribution.
2500
2501 @example
2502 mkdir ~/fritz4
2503 cd ~/fritz4
2504 zic2xpm ~/ziics/fritz4.*
2505 @end example
2506 @item 3. Give XBoard the ``-pixmap'' option when starting up, e.g.:
2507
2508 @example
2509 xboard -pixmap ~/fritz4
2510 @end example
2511
2512 Alternatively, you can add this line to your .Xdefaults file:
2513
2514 @example
2515 xboard*pixmapDirectory: ~/fritz4
2516 @end example
2517 @end table
2518
2519 (*) ZIICS is a separate copyrighted work of Andy McFarland.
2520 The ``ZIICS pieces'' are copyrighted works of their respective
2521 creators. Files produced by ``zic2xpm'' are for PERSONAL USE ONLY
2522 and may NOT be redistributed without explicit permission from
2523 the original creator(s) of the pieces.
2524
2525 @ifnottex
2526 @node Copyright
2527 @unnumbered Copyright
2528 @include copyright.texi
2529 @end ifnottex
2530
2531 @node Copying
2532 @unnumbered GNU GENERAL PUBLIC LICENSE
2533 @include gpl.texinfo
2534
2535 @c noman
2536 @node Index
2537 @unnumbered Index
2538
2539 @printindex cp
2540 @contents
2541 @c end noman