Small changes; see ChangeLog for details.
[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
869 icons, not graphical ones, check its documentation; there is probably
870 a way to enable graphical icons.  If you get black and white reversed,
871 we would like to hear about it; see @ref{Problems} below for
872 instructions on how to report this problem.
873 @end table
874
875 You can add or remove shortcut keys using the X resources
876 @code{form.translations}. Here is an example of what would go in your
877 @file{.Xdefaults} file:
878
879 @example
880 XBoard*form.translations: \
881   Shift<Key>?: AboutGameProc() \n\
882   <Key>y: AcceptProc() \n\
883   <Key>n: DeclineProc() \n\
884   <Key>i: NothingProc()
885 @end example
886 @noindent
887 Binding a key to @code{NothingProc} makes it do nothing, thus removing
888 it as a shortcut key. The XBoard commands that can be bound to keys
889 are:
890
891 @example
892 AbortProc, AboutGameProc, AboutProc, AcceptProc, AdjournProc,
893 AlwaysQueenProc, AnalysisModeProc, AnalyzeFileProc,
894 AnimateDraggingProc, AnimateMovingProc, AutobsProc, AutoflagProc,
895 AutoflipProc, AutoraiseProc, AutosaveProc, BackwardProc,
896 BlindfoldProc, BookProc, CallFlagProc, CopyGameProc, CopyPositionProc,
897 DebugProc, DeclineProc, DrawProc, EditCommentProc, EditGameProc,
898 EditPositionProc, EditTagsProc, EnterKeyProc, FlashMovesProc,
899 FlipViewProc, ForwardProc, GetMoveListProc, HighlightLastMoveProc,
900 HintProc, Iconify, IcsAlarmProc, IcsClientProc, IcsInputBoxProc,
901 InfoProc, LoadGameProc, LoadNextGameProc, LoadNextPositionProc,
902 LoadPositionProc, LoadPrevGameProc, LoadPrevPositionProc,
903 LoadSelectedProc, MachineBlackProc, MachineWhiteProc, MailMoveProc,
904 ManProc, MoveNowProc, MoveSoundProc, NothingProc, OldSaveStyleProc,
905 PasteGameProc, PastePositionProc, PauseProc, PeriodicUpdatesProc,
906 PonderNextMoveProc, PopupExitMessageProc, PopupMoveErrorsProc,
907 PremoveProc, QuietPlayProc, QuitProc, ReloadCmailMsgProc,
908 ReloadGameProc, ReloadPositionProc, RematchProc, ResetProc,
909 ResignProc, RetractMoveProc, RevertProc, SaveGameProc,
910 SavePositionProc, ShowCoordsProc, ShowGameListProc, ShowThinkingProc,
911 StopExaminingProc, StopObservingProc, TestLegalityProc, ToEndProc,
912 ToStartProc, TrainingProc, TruncateGameProc, and TwoMachinesProc.
913 @end example
914
915 @node Options
916 @chapter Options
917 @cindex Options
918 @cindex Options
919
920 This section documents the command-line options to XBoard.  You can
921 set these options in two ways: by typing them on the shell command
922 line you use to start XBoard, or by setting them as X resources
923 (typically in your @file{.Xdefaults} file).  Many of the options
924 cannot be changed while XBoard is running; others set the initial
925 state of items that can be changed with the @ref{Options} menu.
926
927 Most of the options have both a long name and a short name. To turn a
928 boolean option on or off from the command line, either give its long
929 name followed by the value true or false
930 (@samp{-longOptionName true}), or give just the short name to turn the
931 option on (@samp{-opt}), or the short name preceded by @samp{x} to
932 turn the option off (@samp{-xopt}). For options that take strings or
933 numbers as values, you can use the long or short option names
934 interchangeably.
935
936 Each option corresponds to an X resource with the same name, so
937 if you like, you can set options in your @file{.Xdefaults} file
938 or in a file named @file{XBoard} in your home directory.
939 For options that have two names, the longer one is the name of
940 the corresponding X resource; the short name is not recognized.
941 To turn a boolean option on or off as an
942 X resource, give its long name followed by the value
943 true or false (@samp{XBoard*longOptionName: true}).
944
945 @menu
946 * Chess engine options::        Controlling the chess engine.
947 * ICS options::                 Connecting to and using ICS.
948 * Load and Save options::       Input/output options.
949 * User interface options::      Look and feel options.
950 * Other options::               Miscellaneous.
951 @end menu
952
953 @node Chess engine options
954 @section Chess Engine Options
955 @cindex options, Chess engine
956 @cindex Chess engine options
957 @table @asis
958 @item -tc or -timeControl minutes[:seconds]
959 @cindex tc, option
960 @cindex timeControl, option
961 Each player begins with his clock set to the @code{timeControl} period.
962 Default: 5 minutes.
963 The additional options @code{movesPerSession} and @code{timeIncrement}
964 are mutually exclusive.  
965 @item -mps or -movesPerSession moves
966 @cindex mps, option
967 @cindex movesPerSession, option
968 When both players have made @code{movesPerSession} moves, a
969 new @code{timeControl} period is added to both clocks.  Default: 40 moves.
970 @item -inc or -timeIncrement seconds
971 @cindex inc, option
972 @cindex timeIncrement, option
973 If this option is specified, @code{movesPerSession} is ignored.
974 Instead, after each player's move, @code{timeIncrement} seconds are
975 added to his clock.  
976 Use @samp{-inc 0} if you want to require the entire
977 game to be played in one @code{timeControl} period, with no increment.
978 Default: -1, which specifies @code{movesPerSession} mode.
979 @item -clock/-xclock or -clockMode true/false
980 @cindex clock, option
981 @cindex clockMode, option
982 Determines whether or not to display the chess clocks. If clockMode is
983 false, the clocks are not shown, but the side that is to play next
984 is still highlighted. Also, unless @code{searchTime}
985 is set, the chess engine still keeps track of the clock time and uses it to
986 determine how fast to make its moves.
987 @item -st or -searchTime minutes[:seconds]
988 @cindex st, option
989 @cindex searchTime, option
990 Tells the chess engine to spend at most the given amount of time
991 searching for each of its moves. Without this option, the chess engine
992 chooses its search time based on the number of moves and amount
993 of time remaining until the next time control.
994 Setting this option also sets clockMode to false.
995 @item -depth or -searchDepth number
996 @cindex sd, option
997 @cindex searchDepth, option
998 Tells the chess engine to look ahead at most the given number of moves
999 when searching for a move to make. Without this option, the chess
1000 engine chooses its search depth based on the number of moves and
1001 amount of time remaining until the next time control.  With the option,
1002 the engine will cut off its search early if it reaches the specified depth.
1003 @item -thinking/-xthinking or -showThinking true/false
1004 @cindex thinking, option
1005 @cindex showThinking, option
1006 Sets the Show Thinking option. @xref{Options Menu}. Default: false.
1007 @item -ponder/-xponder or -ponderNextMove true/false
1008 @cindex ponder, option
1009 @cindex ponderNextMove, option
1010 Sets the Ponder Next Move menu option. @xref{Options Menu}. Default: true.
1011 @item -mg or -matchGames n
1012 @cindex mg, option
1013 @cindex matchGames, option
1014 Automatically runs an n-game match between two chess engines,
1015 with alternating colors.
1016 If the @code{loadGameFile} or @code{loadPositionFile} option is set,
1017 XBoard
1018 starts each game with the given opening moves or the given position;
1019 otherwise, the games start with the standard initial chess position.
1020 If the @code{saveGameFile} option is set, a move record for the
1021 match is appended to the specified file. If the @code{savePositionFile}
1022 option is set, the final position reached in each game of the match is appended
1023 to the specified file. When the match is over, XBoard
1024 displays the match score and exits. Default: 0 (do not run a match).
1025 @item -mm/-xmm or -matchMode true/false
1026 @cindex mm, option
1027 @cindex matchMode, option
1028 Setting @code{matchMode} to true is equivalent to setting
1029 @code{matchGames} to 1.
1030 @item -fcp or -firstChessProgram program
1031 @cindex fcp, option
1032 @cindex firstChessProgram, option
1033 Name of first chess engine.
1034 Default: @file{gnuchessx}.
1035 @item -scp or -secondChessProgram program
1036 @cindex scp, option
1037 @cindex secondChessProgram, option
1038 Name of second chess engine, if needed.
1039 A second chess engine is started only in Two Machines (match) mode.
1040 Default: @file{gnuchessx}.
1041 @item -fb/-xfb or -firstPlaysBlack true/false
1042 @cindex fb, option
1043 @cindex firstPlaysBlack, option
1044 In games between two chess engines, firstChessProgram normally plays
1045 white.  If this option is true, firstChessProgram plays black.  In a
1046 multi-game match, this option affects the colors only for the first
1047 game; they still alternate in subsequent games.
1048 @item -fh or -firstHost host
1049 @itemx -sh or -secondHost host
1050 @cindex fh, option
1051 @cindex firstHost, option
1052 @cindex sh, option
1053 @cindex secondHost, option
1054 Hosts on which the chess engines are to run. The default for
1055 each is @file{localhost}. If you specify another host, XBoard
1056 uses @file{rsh} to run the chess engine there. (You can substitute a
1057 different remote shell program for rsh using the @code{remoteShell}
1058 option described below.)
1059 @item -fd or -firstDirectory dir
1060 @itemx -sd or -secondDirectory dir
1061 @cindex fd, option
1062 @cindex firstDirectory, option
1063 @cindex sd, option
1064 @cindex secondDirectory, option
1065 Working directories in which the chess engines are to be run.
1066 The default is "", which means to run the chess engine
1067 in the same working directory as XBoard
1068 itself.  (See the CHESSDIR environment variable.)
1069 This option is effective only when the chess engine is being run
1070 on the local host; it does not work if the engine is run remotely
1071 using the -fh or -sh option.
1072 @item -initString string
1073 @itemx -secondInitString string
1074 @cindex initString, option
1075 @cindex secondInitString, option
1076 The string that is sent to initialize each chess engine for a new game.
1077 Default:
1078
1079 @example
1080 new
1081 random
1082 @end example
1083 @noindent
1084 Setting this option from the command line is tricky, because you must
1085 type in real newline characters, including one at the very end.
1086 In most shells you can do this by
1087 entering a @samp{\} character followed by a newline. It is easier to set
1088 the option from your @file{.Xdefaults} file; in that case you can
1089 include the character sequence @samp{\n} in the string, and it will
1090 be converted to a newline.
1091
1092 If you change this option, don't remove the @samp{new} 
1093 command; it is required by all chess engines to
1094 start a new game.
1095
1096 You can remove the @samp{random} command if you like; including it
1097 causes GNU Chess 4 to randomize its move selection slightly so that it
1098 doesn't play the same moves in every game.  Even without
1099 @samp{random}, GNU Chess 4 randomizes its choice of moves from its
1100 opening book.  Many other chess engines ignore this command entirely
1101 and always (or never) randomize.
1102
1103 You can also try adding other commands to the initString; see the
1104 documentation of the chess engine you are using for details.
1105 @item -firstComputerString string
1106 @itemx -secondComputerString string
1107 @cindex firstComputerString, option
1108 @cindex secondComputerString, option
1109 The string that is sent to the chess engine if its opponent is another
1110 computer chess engine.  The default is @samp{computer\n}.  Probably the
1111 only useful alternative is the empty string (@samp{}), which keeps the
1112 engine from knowing that it is playing another computer.
1113 @item -reuse/-xreuse or -reuseFirst true/false
1114 @itemx -reuse2/-xreuse2 or -reuseSecond true/false
1115 @cindex reuse, option
1116 @cindex reuseFirst, option
1117 @cindex reuse2, option
1118 @cindex reuseSecond, option
1119 If the option is false,
1120 XBoard kills off the chess engine after every game and starts
1121 it again for the next game.  
1122 If the option is true (the default), 
1123 XBoard starts the chess engine only once
1124 and uses it repeatedly to play multiple games.
1125 Some old chess engines may not work properly when
1126 reuse is turned on, but otherwise games will start faster if it is left on.
1127 @item -firstProtocolVersion version-number
1128 @itemx -secondProtocolVersion version-number
1129 @cindex firstProtocolVersion, option
1130 @cindex secondProtocolVersion, option
1131 This option specifies which version of the chess engine communication
1132 protocol to use.  By default, version-number is 2.  In version 1, the
1133 "protover" command is not sent to the engine; since version 1 is a
1134 subset of version 2, nothing else changes.  Other values for
1135 version-number are not supported.
1136 @end table
1137
1138 @node ICS options
1139 @section Internet Chess Server Options
1140 @cindex ICS options
1141 @cindex Options, ICS
1142 @table @asis
1143 @item -ics/-xics or -internetChessServerMode true/false
1144 @cindex ics, option
1145 @cindex internetChessServerMode, option
1146 Connect with an Internet Chess Server to play chess against its
1147 other users, observe games they are playing, or review games
1148 that have recently finished. Default: false.
1149 @item -icshost or -internetChessServerHost host
1150 @cindex icshost, option
1151 @cindex internetChessServerHost, option
1152 The Internet host name or address of the chess server to connect
1153 to when in ICS mode. Default: @code{chessclub.com}.
1154 Another popular chess server to try is @code{freechess.org}.
1155 If your site doesn't have a working Internet name server, try
1156 specifying the host address in numeric form. 
1157 You may also need
1158 to specify the numeric address when using the icshelper option
1159 with timestamp or timeseal (see below).
1160 @item -icsport or -internetChessServerPort port-number
1161 @cindex icsport, option
1162 @cindex internetChessServerPort, option
1163 The port number to use when connecting to a chess server in ICS
1164 mode. Default: 5000.
1165 @item -icshelper or -internetChessServerHelper prog-name
1166 @cindex icshelper, option
1167 @cindex internetChessServerHelper, option
1168 An external helper program used to communicate with the chess server.
1169 You would set it to "timestamp" for ICC (chessclub.com) or
1170 "timeseal" for FICS (freechess.org), after
1171 obtaining the correct version of timestamp or timeseal for your
1172 computer.  See "help timestamp" on ICC and "help timeseal" on FICS.
1173 This option is shorthand for @code{-useTelnet -telnetProgram program}.
1174 @item -telnet/-xtelnet or -useTelnet true/false
1175 @cindex telnet, option
1176 @cindex useTelnet, option
1177 This option is poorly named; it should be called useHelper.
1178 If set to true, it instructs XBoard to run an external
1179 program to communicate with the Internet Chess Server. 
1180 The program to use is given by the telnetProgram option.
1181 If the option is
1182 false (the default), XBoard opens a TCP socket and uses its own
1183 internal implementation of the telnet protocol to communicate with the
1184 ICS. @xref{Firewalls}.
1185 @item -telnetProgram prog-name
1186 @cindex telnetProgram, option
1187 This option is poorly named; it should be called helperProgram.
1188 It gives the name of the telnet program to be used with
1189 the @code{gateway} and @code{useTelnet} options.  The default is
1190 @file{telnet}. The telnet program is invoked with the value of
1191 @code{internetChessServerHost} as its first argument and the value
1192 of @code{internetChessServerPort} as its second argument.
1193 @xref{Firewalls}.
1194 @item -gateway host-name
1195 @cindex gateway, option
1196 If this option is set to a host name, XBoard communicates with the
1197 Internet Chess Server by using @file{rsh} to run
1198 the @code{telnetProgram} on the given host,
1199 instead of using its own internal implementation
1200 of the telnet protocol. You can substitute a different remote shell
1201 program for @file{rsh} using the @code{remoteShell} option described below.
1202 @xref{Firewalls}.
1203 @item -internetChessServerCommPort or -icscomm dev-name
1204 @cindex internetChessServerCommPort, option
1205 @cindex icscomm, option
1206 If this option is set, XBoard communicates with the ICS through
1207 the given character I/O device instead of opening a TCP connection.
1208 Use this option if your system does not have any kind of
1209 Internet connection itself (not even a SLIP or PPP connection),
1210 but you do have dialup access (or a hardwired terminal line) to
1211 an Internet service provider from which you can telnet to the ICS.
1212
1213 The support for this option in XBoard is minimal. You need to
1214 set all communication parameters and tty modes before you enter
1215 XBoard.
1216
1217 Use a script something like this:
1218
1219 @example
1220 stty raw -echo 9600 > /dev/tty00
1221 xboard -ics -icscomm /dev/tty00
1222 @end example
1223
1224 Here replace @samp{/dev/tty00} with the name of the device that your
1225 modem is connected to. You might have to add several more
1226 options to these stty commands. See the man pages for @file{stty}
1227 and @code{tty} if you run into problems. Also, on many systems stty
1228 works on its standard input instead of standard output, so you
1229 have to use @samp{<} instead of @samp{>}.
1230
1231 If you are using linux, try starting with the script below.
1232 Change it as necessary for your installation.
1233
1234 @example
1235 #!/bin/sh -f
1236 # configure modem and fire up XBoard
1237
1238 # configure modem
1239 (
1240   stty 2400 ; stty raw ; stty hupcl ; stty -clocal
1241   stty ignbrk ; stty ignpar ; stty ixon ; stty ixoff
1242   stty -iexten ; stty -echo
1243 ) < /dev/modem
1244 xboard -ics -icscomm /dev/modem
1245 @end example
1246 @noindent
1247 After you start XBoard in this way, type whatever commands are
1248 necessary to dial out to your Internet provider and log in.
1249 Then telnet to ICS, using a command like
1250 @kbd{telnet chessclub.com 5000}.
1251 Important: See the paragraph below about extra echoes, 
1252 in @ref{Limitations}.
1253 @item -icslogon or -internetChessServerLogonScript file-name
1254 @cindex icslogon, option
1255 @cindex internetChessServerLogonScript, option
1256 @cindex .icsrc
1257 Whenever XBoard connects to the Internet Chess Server,
1258 if it finds a file with the name given in this option, it feeds the
1259 file's contents to the ICS as commands. The default file name
1260 is @file{.icsrc}.
1261 Usually the first two lines of the file should be
1262 your ICS user name and password.
1263 The file can be either in $CHESSDIR, in XBoard's working
1264 directory if CHESSDIR is not set, or in your home directory.
1265 @item -msLoginDelay delay
1266 @cindex msLoginDelay, option
1267 If you experience trouble logging on to an ICS when using the
1268 @code{-icslogon} option, inserting some delay between characters
1269 of the logon script may help. This option adds @code{delay}
1270 milliseconds of delay between characters. Good values to try
1271 are 100 and 250.
1272 @item -icsinput/-xicsinput or -internetChessServerInputBox true/false
1273 @cindex icsinput, option
1274 @cindex internetChessServerInputBox, option
1275 Sets the ICS Input Box menu option. @xref{Mode Menu}. Default: false.
1276 @item -autocomm/-xautocomm or -autoComment true/false
1277 @cindex autocomm, option
1278 @cindex autoComment, option
1279 Sets the Auto Comment menu option. @xref{Options Menu}. Default: false.
1280 @item -autoflag/-xautoflag or -autoCallFlag true/false
1281 @cindex autoflag, option
1282 @cindex autoCallFlag, option
1283 Sets the Auto Flag menu option.  @xref{Options Menu}. Default: false.
1284 @item -autobs/-xautobs or -autoObserve true/false
1285 @cindex autobs, option
1286 @cindex autoObserve, option
1287 Sets the Auto Observe menu option.  @xref{Options Menu}. Default: false.
1288 @item -moves/-xmoves or -getMoveList true/false
1289 @cindex moves, option
1290 @cindex getMoveList, option
1291 Sets the Get Move List menu option.  @xref{Options Menu}.  Default: true.
1292 @item -alarm/-xalarm or -icsAlarm true/false
1293 @cindex alarm, option
1294 @cindex icsAlarm, option
1295 Sets the ICS Alarm menu option.  @xref{Options Menu}. Default: true.
1296 @item -icsAlarmTime ms
1297 @cindex icsAlarmTime, option
1298 Sets the time in milliseconds for the ICS Alarm menu option. 
1299 @xref{Options Menu}. Default: 5000.
1300 @item -pre/-xpre \fRor\fB -premove true/false
1301 @cindex pre, option
1302 @cindex premove, option
1303 Sets the Premove menu option. @xref{Options Menu}. Default: true.
1304 @item -quiet/-xquiet or -quietPlay true/false
1305 @cindex quiet, option
1306 @cindex quietPlay, option
1307 Sets the Quiet Play menu option.  @xref{Options Menu}.  Default: false.
1308 @item -colorizeMessages or -colorize
1309 @cindex Colors
1310 @cindex colorize, option
1311 Setting colorizeMessages
1312 to true tells XBoard to colorize the messages received from
1313 the ICS.  Colorization works only if your xterm 
1314 supports ISO 6429 escape sequences for changing text colors.
1315 @item -colorShout foreground,background,bold
1316 @itemx -colorSShout foreground,background,bold
1317 @itemx -colorChannel1 foreground,background,bold
1318 @itemx -colorChannel foreground,background,bold
1319 @itemx -colorKibitz foreground,background,bold
1320 @itemx -colorTell foreground,background,bold
1321 @itemx -colorChallege foreground,background,bold
1322 @itemx -colorRequest foreground,background,bold
1323 @itemx -colorSeek foreground,background,bold
1324 @itemx -colorNormal foreground,background,bold
1325 @cindex Colors
1326 @cindex colorShout, option
1327 @cindex colorSShout, option
1328 @cindex colorChannel1, option
1329 @cindex colorChannel, option
1330 @cindex colorKibitz, option
1331 @cindex colorTell, option
1332 @cindex colorChallenge, option
1333 @cindex colorRequest, option
1334 @cindex colorSeek, option
1335 @cindex colorNormal, option
1336 These options set the colors used when colorizing ICS messages.
1337 All ICS messages are grouped into one of these categories:
1338 shout, sshout, channel 1, other channel, kibitz, tell, challenge, 
1339 request (including abort, adjourn, draw, pause, and takeback), or
1340 normal (all other messages).  
1341
1342 Each foreground or background argument can be one of the following:
1343 black, red, green, yellow, blue, magenta, cyan, white, or default.
1344 Here ``default'' means the default foreground or background color of
1345 your xterm.  Bold can be 1 or 0.  If background is omitted, ``default''
1346 is assumed; if bold is omitted, 0 is assumed.
1347
1348 Here is an example of how to set the colors in your @file{.Xdefaults} file.
1349 The colors shown here are the default values; you will get
1350 them if you turn @code{-colorize} on without specifying your own colors.
1351
1352 @example
1353 xboard*colorizeMessages: true   
1354 xboard*colorShout: green
1355 xboard*colorSShout: green, black, 1
1356 xboard*colorChannel1: cyan
1357 xboard*colorChannel: cyan, black, 1
1358 xboard*colorKibitz: magenta, black, 1
1359 xboard*colorTell: yellow, black, 1
1360 xboard*colorChallenge: red, black, 1
1361 xboard*colorRequest: red
1362 xboard*colorSeek: blue
1363 xboard*colorNormal: default
1364 @end example
1365 @item -soundProgram progname
1366 @cindex soundProgram, option
1367 @cindex Sounds
1368 If this option is set to a sound-playing program that is installed and
1369 working on your system, XBoard can play sound files when certain
1370 events occur, listed below.  The default program name is "play".  If
1371 any of the sound options is set to "$", the event rings the terminal
1372 bell by sending a ^G character to standard output, instead of playing
1373 a sound file.  If an option is set to the empty string "", no sound is
1374 played for that event.
1375 @item -soundShout filename
1376 @itemx -soundSShout filename
1377 @itemx -soundChannel filename
1378 @itemx -soundKibitz filename
1379 @itemx -soundTell filename
1380 @itemx -soundChallenge filename
1381 @itemx -soundRequest filename
1382 @itemx -soundSeek filename
1383 @cindex soundShout, option
1384 @cindex soundSShout, option
1385 @cindex soundChannel, option
1386 @cindex soundKibitz, option
1387 @cindex soundTell, option
1388 @cindex soundChallenge, option
1389 @cindex soundRequest, option
1390 @cindex soundSeek, option
1391 These sounds are triggered in the same way as the colorization events
1392 described above.  They all default to "", no sound.  They are played
1393 only if the colorizeMessages is on.
1394 @item -soundMove filename
1395 @cindex soundMove, option
1396 This sound is used by the Move Sound menu option.  Default: "$".
1397 @item -soundIcsAlarm filename
1398 @cindex soundIcsAlarm, option
1399 This sound is used by the ICS Alarm menu option.  Default: "$".
1400 @item -soundIcsWin filename
1401 @cindex soundIcsWin, option
1402 This sound is played when you win an ICS game.  Default: "" (no sound).
1403 @item -soundIcsLoss filename
1404 @cindex soundIcsLoss, option
1405 This sound is played when you lose an ICS game.  Default: "" (no sound).
1406 @item -soundIcsDraw filename
1407 @cindex soundIcsDraw, option
1408 This sound is played when you draw an ICS game.  Default: "" (no sound).
1409 @item -soundIcsUnfinished filename
1410 @cindex soundIcsUnfinished, option
1411 This sound is played when an ICS game that you are participating in is
1412 aborted, adjourned, or otherwise ends inconclusively.  Default: "" (no
1413 sound).
1414
1415 Here is an example of how to set the sounds in your .Xdefaults file:
1416
1417 @example
1418 xboard*soundShout: shout.wav
1419 xboard*soundSShout: sshout.wav
1420 xboard*soundChannel1: channel1.wav
1421 xboard*soundChannel: channel.wav
1422 xboard*soundKibitz: kibitz.wav
1423 xboard*soundTell: tell.wav
1424 xboard*soundChallenge: challenge.wav
1425 xboard*soundRequest: request.wav
1426 xboard*soundSeek: seek.wav
1427 xboard*soundMove: move.wav
1428 xboard*soundIcsWin: win.wav
1429 xboard*soundIcsLoss: lose.wav
1430 xboard*soundIcsDraw: draw.wav
1431 xboard*soundIcsUnfinished: unfinished.wav
1432 xboard*soundIcsAlarm: alarm.wav
1433 @end example
1434 @end table
1435
1436 @node Load and Save options
1437 @section Load and Save Options
1438 @cindex Options, Load and Save
1439 @cindex Load and Save options
1440 @table @asis
1441 @item -lgf or -loadGameFile file
1442 @itemx -lgi or -loadGameIndex index
1443 @cindex lgf, option
1444 @cindex loadGameFile, option
1445 @cindex lgi, option
1446 @cindex loadGameIndex, option
1447 If the @code{loadGameFile} option is set, XBoard loads the specified
1448 game file at startup. The file name @file{-} specifies the standard
1449 input. If there is more than one game in the file, XBoard
1450 pops up a menu of the available games, with entries based on their PGN 
1451 (Portable Game Notation) tags.
1452 If the @code{loadGameIndex} option is set to @samp{N}, the menu is suppressed
1453 and the N th game found in the file is loaded immediately.
1454 The menu is also suppressed if @code{matchMode} is enabled or if the game file
1455 is a pipe; in these cases the first game in the file is loaded immediately.
1456 Use the @file{pxboard} shell script provided with XBoard if you
1457 want to pipe in files containing multiple games and still see the menu.
1458 @item -td or -timeDelay seconds
1459 @cindex td, option
1460 @cindex timeDelay, option
1461 Time delay between moves during @samp{Load Game}. Fractional seconds
1462 are allowed; try @samp{-td 0.4}. A time delay value of -1 tells
1463 XBoard not to step through game files automatically. Default: 1
1464 second.
1465 @item -sgf or -saveGameFile file
1466 @cindex sgf, option
1467 @cindex saveGameFile, option
1468 If this option is set, XBoard appends a record of every game
1469 played to the specified file. The file name @file{-} specifies the
1470 standard output.
1471 @item -autosave/-xautosave or -autoSaveGames true/false
1472 @cindex autosave, option
1473 @cindex autoSaveGames, option
1474 Sets the Auto Save menu option.  @xref{Options Menu}.  Default: false.
1475 Ignored if @code{saveGameFile} is set.
1476 @item -lpf or -loadPositionFile file
1477 @itemx -lpi or -loadPositionIndex index
1478 @cindex lpf, option
1479 @cindex loadPositionFile, option
1480 @cindex lpi, option
1481 @cindex loadPositionIndex, option
1482 If the @code{loadPositionFile} option is set, XBoard loads the
1483 specified position file at startup. The file name @file{-} specifies the
1484 standard input. If the @code{loadPositionIndex} option is set to N,
1485 the Nth position found in the file is loaded; otherwise the
1486 first position is loaded.
1487 @item -spf or -savePositionFile file
1488 @cindex spf, option
1489 @cindex savePositionFile, option
1490 If this option is set, XBoard appends the final position reached
1491 in every game played to the specified file. The file name @file{-}
1492 specifies the standard output.
1493 @item -oldsave/-xoldsave or -oldSaveStyle true/false
1494 @cindex oldsave, option
1495 @cindex oldSaveStyle, option
1496 Sets the Old Save Style menu option.  @xref{Options Menu}.  Default: false.
1497 @end table
1498
1499 @node User interface options
1500 @section User Interface Options
1501 @cindex User interface options
1502 @cindex Options, User interface
1503 @table @asis
1504 @item -display
1505 @itemx -geometry
1506 @itemx -iconic
1507 @cindex display, option
1508 @cindex geometry, option
1509 @cindex iconic, option
1510 These and most other standard Xt options are accepted.
1511 @item -movesound/-xmovesound or -ringBellAfterMoves true/false
1512 @cindex movesound, option
1513 @cindex bell, option
1514 @cindex ringBellAfterMoves, option
1515 Sets the Move Sound menu option.  @xref{Options Menu}.  Default: false.
1516 For compatibility with old XBoard versions, -bell/-xbell are also 
1517 accepted as abbreviations for this option.
1518 @item -exit/-xexit or -popupExitMessage true/false
1519 @cindex exit, option
1520 @cindex popupExitMessage, option
1521 Sets the Popup Exit Message menu option.  @xref{Options Menu}. Default: true.
1522 @item -popup/-xpopup or -popupMoveErrors true/false
1523 @cindex popup, option
1524 @cindex popupMoveErrors, option
1525 Sets the Popup Move Errors menu option.  @xref{Options Menu}. Default: false.
1526 @item -queen/-xqueen or -alwaysPromoteToQueen true/false
1527 @cindex queen, option
1528 @cindex alwaysPromoteToQueen, option
1529 Sets the Always Queen menu option.  @xref{Options Menu}.  Default: false.
1530 @item -legal/-xlegal or -testLegality true/false
1531 @cindex legal, option
1532 @cindex testLegality, option
1533 Sets the Test Legality menu option.  @xref{Options Menu}.  Default: true.
1534 @item -size or -boardSize (sizeName | n1,n2,n3,n4,n5,n6,n7)
1535 @cindex size, option
1536 @cindex boardSize, option
1537 @cindex board size
1538 Determines how large the board will be, by selecting the pixel size
1539 of the pieces and setting a few related parameters.
1540 The sizeName can be one of: Titanic, giving 129x129 pixel pieces,
1541 Colossal 116x116, Giant 108x108, Huge 95x95, Big 87x87, Large 80x80, Bulky 72x72,
1542 Medium 64x64, Moderate 58x58, Average 54x54, Middling 49x49, Mediocre
1543 45x45, Small 40x40, Slim 37x37, Petite 33x33, Dinky 29x29, Teeny 25x25,
1544 or Tiny 21x21.
1545 Pieces of all these sizes are built into XBoard.
1546 Other sizes can
1547 be used if you have them; see the pixmapDirectory and bitmapDirectory
1548 options.
1549 The default depends on the size of your screen; it is approximately the
1550 largest size that will fit without clipping.
1551
1552 You can select other sizes or vary other layout parameters by providing
1553 a list of comma-separated values (with no spaces) as the argument.
1554 You do not need to provide all the values; for any you omit from the
1555 end of the list, defaults are taken from the nearest built-in size.
1556 The value @code{n1} gives the piece size, @code{n2} the width of the
1557 black border
1558 between squares, @code{n3} the desired size for the 
1559 clockFont, @code{n4} the desired size for the coordFont,
1560 @code{n5} the desired size for the default font,
1561 @code{n6} the smallLayout flag (0 or 1), 
1562 and @code{n7} the tinyLayout flag (0 or 1).  
1563 All dimensions are in pixels.
1564 If the border between squares is eliminated (0 width), the various
1565 highlight options will not work, as there is nowhere to draw the highlight.
1566 If smallLayout is 1 and @code{titleInWindow} is true, 
1567 the window layout is rearranged to make more room for the title.
1568 If tinyLayout is 1, the labels on the menu bar are abbreviated
1569 to one character each and the buttons in the button bar are made narrower.
1570 @item -coords/-xcoords or -showCoords true/false
1571 @cindex coords, option
1572 @cindex showCoords, option
1573 Sets the Show Coords menu option.  @xref{Options Menu}.  Default: false.
1574 The @code{coordFont} option specifies what font to use.
1575 @item -autoraise/-xautoraise or -autoRaiseBoard true/false
1576 @cindex autoraise, option
1577 @cindex autoRaiseBoard, option
1578 Sets the Auto Raise Board menu option.  @xref{Options Menu}.  Default: true.
1579 @item -autoflip/-xautoflip or -autoFlipView true/false
1580 @cindex autoflip, option
1581 @cindex autoFlipView, option
1582 Sets the Auto Flip View menu option.  @xref{Options Menu}.  Default: true.
1583 @item -flip/-xflip or -flipView true/false
1584 @cindex flip, option
1585 @cindex flipView, option
1586 If Auto Flip View is not set, or if you are observing but not participating
1587 in a game, then the positioning of the board at the start of each game
1588 depends on the flipView option.  If flipView is false (the default),
1589 the board is positioned so that the white pawns move from the bottom to the
1590 top; if true, the black pawns move from the bottom to the top.
1591 In any case, the Flip menu option (see @ref{Options Menu})
1592 can be used to flip the board after
1593 the game starts.
1594 @item -title/-xtitle or -titleInWindow true/false
1595 @cindex title, option
1596 @cindex titleInWindow, option
1597 If this option is true, XBoard displays player names (for ICS
1598 games) and game file names (for @samp{Load Game}) inside its main
1599 window. If the option is false (the default), this information is
1600 displayed only in the window banner. You probably won't want to
1601 set this option unless the information is not showing up in the
1602 banner, as happens with a few X window managers.
1603 @item -buttons/-xbuttons or -showButtonBar True/False
1604 @cindex buttons, option
1605 @cindex showButtonBar, option
1606 If this option is False, xboard omits the [<<] [<] [P] [>] [>>] button
1607 bar from the window, allowing the message line to be wider.  You can
1608 still get the functions of these buttons using the menus or their keyboard
1609 shortcuts.  Default: true.
1610 @item -mono/-xmono or -monoMode true/false
1611 @cindex mono, option
1612 @cindex monoMode, option
1613 Determines whether XBoard displays its pieces and squares with
1614 two colors (true) or four (false). You shouldn't have to
1615 specify @code{monoMode}; XBoard will determine if it is necessary.
1616 @item -flashCount count
1617 @itemx -flashRate rate
1618 @itemx -flash/-xflash
1619 @cindex flashCount, option
1620 @cindex flashRate, option
1621 @cindex flash, option
1622 @cindex xflash, option
1623 These options enable flashing of pieces when they
1624 land on their destination square.
1625 @code{flashCount}
1626 tells XBoard how many times to flash a piece after it
1627 lands on its destination square.
1628 @code{flashRate}
1629 controls the rate of flashing (flashes/sec).
1630 Abbreviations:
1631 @code{flash}
1632 sets flashCount to 3.
1633 @code{xflash}
1634 sets flashCount to 0.
1635 Defaults:  flashCount=0 (no flashing), flashRate=5.
1636 @item -highlight/-xhighlight or -highlightLastMove true/false
1637 @cindex highlight, option
1638 @cindex highlightLastMove, option
1639 Sets the Highlight Last Move menu option. @xref{Options Menu}. Default: false.
1640 @item -blind/-xblind or -blindfold true/false
1641 @cindex blind, option
1642 @cindex blindfold, option
1643 Sets the Blindfold menu option.  @xref{Options Menu}.  Default: false.
1644 @item -clockFont font
1645 @cindex clockFont, option
1646 @cindex Font, clock
1647 The font used for the clocks. If the option value is a pattern
1648 that does not specify the font size, XBoard tries to choose an
1649 appropriate font for the board size being used.
1650 Default: -*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*.
1651 @item -coordFont font
1652 @cindex coordFont, option
1653 @cindex Font, coordinates
1654 The font used for rank and file coordinate labels if @code{showCoords}
1655 is true. If the option value is a pattern that does not specify
1656 the font size, XBoard tries to choose an appropriate font for
1657 the board size being used.
1658 Default: -*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*.
1659 @item -font font
1660 @cindex font, option
1661 @cindex Font
1662 The font used for popup dialogs, menus, comments, etc.
1663 If the option value is a pattern that does not specify
1664 the font size, XBoard tries to choose an appropriate font for
1665 the board size being used.
1666 Default: -*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*.
1667 @item -fontSizeTolerance tol
1668 @cindex fontSizeTolerance, option
1669 In the font selection algorithm, a nonscalable font will be preferred
1670 over a scalable font if the nonscalable font's size differs
1671 by @code{tol} pixels
1672 or less from the desired size.  A value of -1 will force
1673 a scalable font to always be used if available; a value of 0 will
1674 use a nonscalable font only if it is exactly the right size; 
1675 a large value (say 1000) will force a nonscalable font to always be
1676 used if available.  Default: 4.
1677 @item -bm or -bitmapDirectory dir
1678 @itemx -pixmap or -pixmapDirectory dir
1679 @cindex bm, option
1680 @cindex bitmapDirectory, option
1681 @cindex pixmap, option
1682 @cindex pixmapDirectory, option
1683 These options control what piece images xboard uses.  The XBoard
1684 distribution includes one set of pixmap pieces in xpm format, in the
1685 directory @file{pixmaps}, and one set of bitmap pieces in xbm format,
1686 in the directory @file{bitmaps}.  Pixmap
1687 pieces give a better appearance on the screen: the white pieces have
1688 dark borders, and the black pieces have opaque internal details.  With
1689 bitmaps, neither piece color has a border, and the internal details
1690 are transparent; you see the square color or other background color
1691 through them.
1692
1693 If XBoard is configured and compiled on a system that includes libXpm,
1694 the X pixmap library, the xpm pixmap pieces are compiled in as the
1695 default.  A different xpm piece set can be selected at runtime with
1696 the @code{pixmapDirectory} option, or a bitmap piece set can be selected
1697 with the @code{bitmapDirectory} option.
1698
1699 If XBoard is configured and compiled on a system that does not include
1700 libXpm (or the @code{--disable-xpm} option is given to the configure
1701 program), the bitmap pieces are compiled in as the default.  It is not
1702 possible to use xpm pieces in this case, but pixmap pieces in another
1703 format called "xim" can be used by giving the @code{pixmapDirectory} option.
1704 Or again, a different bitmap piece set can be selected with the
1705 @code{bitmapDirectory} option.
1706
1707 Files in the @code{bitmapDirectory} must be named as follows:
1708 The first character of a piece bitmap name gives the piece it 
1709 represents (@samp{p}, @samp{n}, @samp{b}, @samp{r}, @samp{q}, or @samp{k}),
1710 the next characters give the size in pixels, the
1711 following character indicates whether the piece is
1712 solid or outline (@samp{s} or @samp{o}),
1713 and the extension is @samp{.bm}.
1714 For example, a solid 80x80 knight would be named @file{n80s.bm}.
1715 The outline bitmaps are used only in monochrome mode.
1716 If bitmap pieces are compiled in and the bitmapDirectory is missing
1717 some files, the compiled in pieces are used instead.
1718
1719 If the bitmapDirectory option is given,
1720 it is also possible to replace xboard's icons and menu checkmark,
1721 by supplying files named @file{icon_white.bm}, @file{icon_black.bm}, and
1722 @file{checkmark.bm}.
1723
1724 For more information about pixmap pieces and how to get additional
1725 sets, see @ref{zic2xpm} below.
1726 @item -whitePieceColor color
1727 @itemx -blackPieceColor color
1728 @itemx -lightSquareColor color
1729 @itemx -darkSquareColor color
1730 @itemx -highlightSquareColor color
1731 @cindex Colors
1732 @cindex whitePieceColor, option
1733 @cindex blackPieceColor, option
1734 @cindex lightSquareColor, option
1735 @cindex darkSquareColor, option
1736 @cindex highlightSquareColor, option
1737 Colors to use for the pieces, squares, and square highlights.
1738 Defaults:
1739
1740 @example
1741 -whitePieceColor       #FFFFCC
1742 -blackPieceColor       #202020
1743 -lightSquareColor      #C8C365
1744 -darkSquareColor       #77A26D
1745 -highlightSquareColor  #FFFF00
1746 -premoveHighlightColor #FF0000
1747 @end example
1748
1749 On a grayscale monitor you might prefer:
1750
1751 @example
1752 -whitePieceColor       gray100
1753 -blackPieceColor       gray0
1754 -lightSquareColor      gray80
1755 -darkSquareColor       gray60
1756 -highlightSquareColor  gray100
1757 -premoveHighlightColor gray70
1758 @end example
1759 @item -drag/-xdrag or -animateDragging true/false
1760 @cindex drag, option
1761 @cindex animateDragging, option
1762 Sets the Animate Dragging menu option. @xref{Options Menu}.  Default: true.
1763 @item -animate/-xanimate or -animateMoving true/false
1764 @cindex animate, option
1765 @cindex animateMoving, option
1766 Sets the Animate Moving menu option. @xref{Options Menu}.  Default: true.
1767 @item -animateSpeed n
1768 @cindex -animateSpeed, option
1769 Number of milliseconds delay between each animation frame when Animate
1770 Moves is on.
1771 @end table
1772
1773 @node Other options
1774 @section Other Options
1775 @cindex Options, miscellaneous
1776 @table @asis
1777 @item -ncp/-xncp or -noChessProgram true/false
1778 @cindex ncp, option
1779 @cindex noChessProgram, option
1780 If this option is true, XBoard acts as a passive chessboard; it
1781 does not start a chess engine at all. Turning on this option
1782 also turns off clockMode. Default: false.
1783 @item -mode or -initialMode modename
1784 @cindex mode, option
1785 @cindex initalMode, option
1786 If this option is given, XBoard selects the given modename
1787 from the Mode menu after starting and (if applicable) processing the
1788 loadGameFile or loadPositionFile option. Default: "" (no selection). 
1789 Other supported values are 
1790 MachineWhite, MachineBlack, TwoMachines, Analysis, 
1791 AnalyzeFile, EditGame, EditPosition, and Training.
1792 @item -variant varname
1793 @cindex variant, option
1794 Activates preliminary, partial support for playing chess variants
1795 against a local engine or editing variant games.  This flag is not
1796 needed in ICS mode.  Recognized variant names are:
1797
1798 @example
1799 normal        Normal chess
1800 wildcastle    Shuffle chess, king can castle from d file
1801 nocastle      Shuffle chess, no castling allowed
1802 fischerandom  Fischer Random shuffle chess
1803 bughouse      Bughouse, ICC/FICS rules
1804 crazyhouse    Crazyhouse, ICC/FICS rules
1805 losers        Lose all pieces or get mated (ICC wild 17)
1806 suicide       Lose all pieces including king (FICS)
1807 giveaway      Try to have no legal moves (ICC wild 26)
1808 twokings      Weird ICC wild 9
1809 kriegspiel    Opponent's pieces are invisible
1810 atomic        Capturing piece explodes (ICC wild 27)
1811 3check        Win by giving check 3 times (ICC wild 25)
1812 shatranj      An ancient precursor of chess (ICC wild 28)
1813 unknown       Catchall for other unknown variants
1814 @end example
1815
1816 In the shuffle variants, xboard does not shuffle the pieces, but
1817 you can do it by hand using Edit Position.  Some variants are
1818 supported only in ICS mode, including fischerandom, bughouse, and
1819 kriegspiel.  The winning/drawing conditions in crazyhouse (offboard
1820 interposition on mate), losers, suicide, giveaway, atomic, and 3check
1821 are not fully understood.  In crazyhouse, xboard does not yet keep
1822 track of offboard pieces.  Shatranj is unsupported, but it may be
1823 usable if you turn off Test Legality.
1824 @item -debug/-xdebug or -debugMode true/false
1825 @cindex debug, option
1826 @cindex debugMode, option
1827 Turns on debugging printout.
1828 @item -rsh or -remoteShell shell-name
1829 @cindex rsh, option
1830 @cindex remoteShell, option
1831 Name of the command used to run programs remotely. The default
1832 is @file{rsh} or @file{remsh}, determined when XBoard is
1833 configured and compiled.
1834 @item -ruser or -remoteUser user-name
1835 @cindex ruser, option
1836 @cindex remoteUser, option
1837 User name on the remote system when running programs with the
1838 @code{remoteShell}. The default is your local user name.
1839 @end table
1840
1841 @node Chess Servers
1842 @chapter Chess Servers
1843 @cindex ICS
1844 @cindex ICS, addresses
1845 @cindex Internet Chess Server
1846 An @dfn{Internet Chess Server}, or @dfn{ICS}, is a place on the
1847 Internet where people can get together to play chess, watch other
1848 people's games, or just chat.  You can use either @code{telnet} or a
1849 client program like XBoard to connect to the server.  There are
1850 thousands of registered users on the different ICS hosts, and it is
1851 not unusual to meet 200 on both chessclub.com and freechess.org.
1852
1853 Most people can just type @kbd{xboard -ics} to start XBoard as an ICS
1854 client.  Invoking XBoard in this way connects you to the Internet
1855 Chess Club (ICC), a commercial ICS.  You can log in there as a guest
1856 even if you do not have a paid account.  To connect to the largest
1857 Free ICS (FICS), use the command @kbd{xboard -ics -icshost freechess.org}
1858 instead, or substitute a different host name to connect to your
1859 favorite ICS.
1860 For a full description of command-line options that control 
1861 the connection to ICS and change the default values of ICS options, see
1862 @ref{ICS options}.  
1863
1864 While you are running XBoard as an ICS client,
1865 you use the terminal window that you started XBoard from
1866 as a place to type in commands and read information that is
1867 not available on the chessboard.
1868
1869 The first time you need to use the terminal is to enter your login name
1870 and password, if you are a registered player. (You don't need to do
1871 this manually; the @code{icsLogon} option can do it for you.
1872 @pxref{ICS options}.)  If you are not registered, 
1873 enter @kbd{g} as your name, and the server will pick a
1874 unique guest name for you.
1875
1876 Some useful ICS commands
1877 include
1878 @table @kbd
1879 @item help <topic>
1880 @cindex help, ICS command
1881 to get help on the given <topic>. To get a list of possible topics type
1882 @dfn{help} without topic.  Try the help command before you ask other
1883 people on the server for help.
1884
1885 For example @kbd{help register} tells you how to become a registered
1886 ICS player.
1887 @item who <flags>
1888 @cindex who, ICS command
1889 to see a list of people who are logged on.  Administrators
1890 (people you should talk to if you have a problem) are marked
1891 with the character @samp{*}, an asterisk. The <flags> allow you to
1892 display only selected players: For example, @kbd{who of} shows a
1893 list of players who are interested in playing but do not have
1894 an opponent.
1895 @item games
1896 @cindex games, ICS command
1897 to see what games are being played
1898 @item match <player> [<mins>] [<inc>]
1899 to challenge another player to a game. Both opponents get <mins> minutes
1900 for the game, and <inc> seconds will be added after each move.
1901 If another player challenges you, the server asks if you want to
1902 accept the challenge; use the @kbd{accept} or @kbd{decline} commands
1903 to answer.
1904 @item accept
1905 @itemx decline
1906 @cindex accept, ICS command
1907 @cindex decline, ICS command
1908 to accept or decline another player's offer. 
1909 The offer may be to start a new game, or to agree to a 
1910 @kbd{draw}, @kbd{adjourn} or @kbd{abort} the current game. @xref{Action Menu}.
1911
1912 If you have more than one pending offer (for example, if more than one player
1913 is challenging you, or if your opponent offers both a draw and to adjourn the
1914 game), you have to supply additional information, by typing something
1915 like @kbd{accept <player>}, @kbd{accept draw}, or @kbd{draw}.
1916 @item draw
1917 @itemx adjourn
1918 @itemx abort
1919 @cindex draw, ICS command
1920 @cindex adjourn, ICS command
1921 @cindex abort, ICS command
1922 asks your opponent to terminate a game by mutual agreement. Adjourned
1923 games can be continued later. 
1924 Your opponent can either @kbd{decline} your offer or accept it (by typing the
1925 same command or typing @kbd{accept}).  In some cases these commands work
1926 immediately, without asking your opponent to agree.  For example, you can
1927 abort the game unilaterally if your opponent is out of time, and you can claim
1928 a draw by repetition or the 50-move rule if available simply by typing 
1929 @kbd{draw}.
1930 @item finger <player>
1931 @cindex finger, ICS command
1932 to get information about the given <player>. (Default: yourself.)
1933 @item vars
1934 @cindex vars, ICS command
1935 to get a list of personal settings
1936 @item set <var> <value>
1937 @cindex set, ICS command
1938 to modify these settings
1939 @item observe <player>
1940 @cindex observe, ICS command
1941 to observe an ongoing game of the given <player>.
1942 @item examine
1943 @itemx oldmoves
1944 @cindex examine, ICS command
1945 @cindex oldmoves, ICS command
1946 to review a recently completed game
1947 @end table
1948
1949 Some special XBoard features are activated when you are
1950 in examine mode on ICS.  See the descriptions of the menu commands
1951 @samp{Forward}, @samp{Backward}, @samp{Pause}, @samp{ICS Client}, 
1952 and @samp{Stop Examining} on the @ref{Step Menu}, @ref{Mode Menu}, and
1953 @ref{Options Menu}.
1954
1955 @node Firewalls
1956 @chapter Firewalls
1957 By default, XBoard communicates with an Internet Chess Server
1958 by opening a TCP socket directly from the machine it is running on
1959 to the ICS. If there is a firewall between your machine and the ICS,
1960 this won't work. Here are some recipes for getting around common
1961 kinds of firewalls using special options to XBoard.
1962 Important: See the paragraph in the below about extra echoes, in
1963 @ref{Limitations}.
1964
1965 Suppose that you can't telnet directly to ICS, but you can telnet
1966 to a firewall host, log in, and then telnet from there to ICS.
1967 Let's say the firewall is called @samp{firewall.example.com}. Set
1968 command-line options as follows:
1969
1970 @example
1971 xboard -ics -icshost firewall.example.com -icsport 23
1972 @end example
1973 @noindent
1974 Or in your @file{.Xdefaults} file:
1975
1976 @example
1977 XBoard*internetChessServerHost: firewall.example.com
1978 XBoard*internetChessServerPort: 23
1979 @end example
1980 @noindent
1981 Then when you run XBoard in ICS mode, you will be prompted
1982 to log in to the firewall host. This works because port 23 is the
1983 standard telnet login service. Do so, then telnet to ICS, using a
1984 command like @samp{telnet chessclub.com 5000}, or whatever command
1985 the firewall provides for telnetting to port 5000.
1986
1987 If your firewall lets you telnet (or rlogin) to remote hosts but
1988 doesn't let you telnet to port 5000, you may be able to connect to the
1989 chess server on port 23 instead, which is the port the telnet program
1990 uses by default.  Some chess servers support this (including
1991 chessclub.com and freechess.org), while some do not.
1992
1993 If your chess server does not allow connections on port 23 and your
1994 firewall does not allow you to connect to other ports, you may be able
1995 to connect by hopping through another host outside the firewall that
1996 you have an account on.  For instance, suppose you have a shell
1997 account at @samp{foo.edu}. Follow the recipe above, but instead of
1998 typing @samp{telnet chessclub.com 5000} to the firewall, type
1999 @samp{telnet foo.edu} (or @samp{rlogin foo.edu}), log in there, and
2000 then type @samp{telnet chessclub.com 5000}.
2001
2002 Suppose that you can't telnet directly to ICS, but you can use rsh
2003 to run programs on a firewall host, and that host can telnet to ICS.
2004 Let's say the firewall is called @samp{rsh.example.com}. Set
2005 command-line options as follows:
2006
2007 @example
2008 xboard -ics -gateway rsh.example.com -icshost chessclub.com
2009 @end example
2010
2011 @noindent
2012 Or in your @file{.Xdefaults} file:
2013
2014 @example
2015 XBoard*gateway: rsh.example.com
2016 XBoard*internetChessServerHost: chessclub.com
2017 @end example
2018
2019 Then when you run XBoard in ICS mode, it will connect to
2020 the ICS by using @file{rsh} to run the command
2021 @samp{telnet chessclub.com 5000} on host @samp{rsh.example.com}.
2022
2023 Suppose that you can telnet anywhere you want, but you have to
2024 run a special program called @file{ptelnet} to do so.
2025
2026 First, we'll consider the easy case, in which
2027 @samp{ptelnet chessclub.com 5000} gets you to the chess server.
2028 In this case set command line options as follows:
2029
2030 @example
2031 xboard -ics -telnet -telnetProgram ptelnet
2032 @end example
2033
2034 @noindent
2035 Or in your @file{.Xdefaults} file:
2036
2037 @example
2038 XBoard*useTelnet: true
2039 XBoard*telnetProgram: ptelnet
2040 @end example
2041
2042 @noindent
2043 Then when you run XBoard in ICS mode, it will issue the
2044 command @samp{ptelnet chessclub.com 5000} to connect to the ICS.
2045
2046 Next, suppose that @samp{ptelnet chessclub.com 5000} doesn't work;
2047 that is, your @file{ptelnet} program doesn't let you connect to
2048 alternative ports. As noted above, your chess server may allow you to
2049 connect on port 23 instead.  In that case, just add the option
2050 @samp{-icsport ""} to the above command, or add
2051 @samp{XBoard*internetChessServerPort:} to your @file{.Xdefaults} file.
2052 But if your chess server doesn't let you connect on port 23, you will have
2053 to find some other host outside the firewall and hop through it. For
2054 instance, suppose you have a shell account at @samp{foo.edu}. Set
2055 command line options as follows:
2056
2057 @example
2058 xboard -ics -telnet -telnetProgram ptelnet -icshost foo.edu -icsport ""
2059 @end example
2060
2061 @noindent
2062 Or in your @file{.Xdefaults} file:
2063
2064 @example
2065 XBoard*useTelnet: true
2066 XBoard*telnetProgram: ptelnet
2067 XBoard*internetChessServerHost: foo.edu
2068 XBoard*internetChessServerPort:
2069 @end example
2070
2071 @noindent
2072 Then when you run XBoard in ICS mode, it will issue the
2073 command @samp{ptelnet foo.edu} to connect to your account at
2074 @samp{foo.edu}. Log in there, then type @samp{telnet chessclub.com 5000}.
2075
2076 ICC timestamp and FICS timeseal do not work through some
2077 firewalls.  You can use them only if your firewall gives a clean TCP
2078 connection with a full 8-bit wide path.  If your firewall allows you
2079 to get out only by running a special telnet program, you can't use
2080 timestamp or timeseal across it.  But if you have access to a
2081 computer just outside your firewall, and you have much lower netlag
2082 when talking to that computer than to the ICS, it might be worthwhile
2083 running timestamp there.  Follow the instructions above for hopping
2084 through a host outside the firewall (foo.edu in the example),
2085 but run timestamp or timeseal on that host instead of telnet.
2086
2087 Suppose that you have a SOCKS firewall that will give you a clean
2088 8-bit wide TCP connection to the chess server, but only after you
2089 authenticate yourself via the SOCKS protocol.  In that case, you could
2090 make a socksified version of XBoard and run that.  If you are using
2091 timestamp or timeseal, you will to socksify it, not XBoard; this may
2092 be difficult seeing that ICC and FICS do not provide source code for
2093 these programs.  Socksification is beyond the scope of this document,
2094 but see the SOCKS Web site at http://www.socks.permeo.com/.
2095 If you are missing SOCKS, try http://www.funbureau.com/.
2096
2097 @node Environment
2098 @chapter Environment variables
2099 @cindex Environment variables
2100 @cindex CHESSDIR
2101 Game and position files are found in a directory named by the
2102 @code{CHESSDIR} environment variable. If this variable is not set, the
2103 current working directory is used. If @code{CHESSDIR} is set,
2104 XBoard actually changes its working directory to
2105 @code{$CHESSDIR}, so any files written by the chess engine
2106 will be placed there too.
2107
2108 @node Limitations
2109 @chapter Limitations and known bugs
2110 @cindex Limitations
2111 @cindex Bugs
2112 There is no way for two people running copies of XBoard to play
2113 each other without going through an Internet Chess Server.
2114
2115 Under some circumstances, your ICS password may be echoed when you log on.
2116
2117 If you are connecting to the ICS by running telnet on an Internet
2118 provider or firewall host, you may find that each line you type is
2119 echoed back an extra time after you hit @key{Enter}. If your Internet
2120 provider is a Unix system, you can probably turn its echo off by
2121 typing @kbd{stty -echo} after you log in, and/or typing
2122 @key{^E}@key{Enter} (Ctrl+E followed by the Enter key) to the telnet
2123 program after you have logged into ICS.  It is a good idea to do this
2124 if you can, because the extra echo can occasionally confuse XBoard's
2125 parsing routines.
2126
2127 The game parser recognizes only algebraic notation.
2128
2129 The internal move legality tester does not look at the game history,
2130 so in some cases it misses illegal castling or en passant captures.
2131 It permits castling with the king on the d file because this is possible in
2132 some "wild 1" games on ICS.  It does not check
2133 piece drops in bughouse and crazyhouse to see if you actually
2134 hold the piece you are trying to drop.
2135 However, if you attempt an illegal move when using
2136 a chess engine or chess server, XBoard will accept the error message
2137 that comes back, undo the move, and let you try another.
2138
2139 Fischer Random castling is not understood.  You can probably play
2140 Fischer Random successfully on ICS by typing castling moves into the ICS
2141 Interaction window, but they will not be animated correctly, and saved
2142 games will not be loaded correctly if castling occurs.
2143
2144 FEN positions saved by XBoard
2145 never include correct information about whether castling is legal or
2146 how many half-moves have been made since the last irreversible move,
2147 and sometimes may not correctly indicate when en passant capture is available.
2148
2149 The mate detector does not understand that non-contact mate is not
2150 really mate in bughouse and crazyhouse.  The only problem this causes
2151 while playing is minor: a @samp{#} (mate indicator) character will show
2152 up after a non-contact mating move in the move list; XBoard will
2153 not assume the game is over at that point.  However, if you are editing
2154 a game, Edit Game mode will be terminated by a non-contact mate.
2155
2156 The menus may not work if your keyboard is in Caps Lock or Num Lock mode.
2157 This seems to be a problem with the Athena menu widget,
2158 not an XBoard bug.
2159
2160 Also see the ToDo file included with the distribution for many other
2161 possible bugs, limitations, and ideas for improvement that have been
2162 suggested.
2163 @node Problems
2164 @chapter Reporting problems
2165 @cindex Bugs
2166 @cindex Bug reports
2167 @cindex Reporting bugs
2168 @cindex Problems
2169 @cindex Reporting problems
2170
2171 Report bugs and problems with XBoard to @code{<bug-xboard@@gnu.org>}.
2172
2173 Please use the @file{script} program to start a typescript, run 
2174 XBoard with the @samp{-debug} option, and include the typescript
2175 output in your message.
2176 Also tell us what kind of machine and what operating system version
2177 you are using.  The command @samp{uname -a} will often tell you this.
2178 Here is a sample of approximately what you should type:
2179
2180 @example
2181 script
2182 uname -a
2183 ./configure
2184 make
2185 ./xboard -debug
2186 exit
2187 mail bug-xboard@@gnu.org
2188 Subject: Your short description of the problem
2189 Your detailed description of the problem
2190 ~r typescript
2191 .
2192 @end example
2193
2194 If you improve XBoard, please send a message about your changes,
2195 and we will get in touch with you about merging them in
2196 to the main line of development.
2197 Also see our Web site at http://savannah.gnu.org/projects/xboard/.
2198
2199 @node Contributors
2200 @chapter Authors and contributors
2201 @cindex Authors
2202 @cindex Contributors
2203
2204 Tim Mann has been responsible for XBoard versions 1.3 and beyond, and
2205 for WinBoard, a port of XBoard to Microsoft Win32 (Windows NT and
2206 Windows 95).
2207
2208 Mark Williams contributed the initial (WinBoard-only) implementation
2209 of many new features added to both XBoard and WinBoard in version
2210 4.1.0, including copy/paste, premove, icsAlarm, autoFlipView, training
2211 mode, auto raise, and blindfold.  Ben Nye contributed X copy/paste
2212 code for XBoard.
2213
2214 Hugh Fisher added animated piece movement to XBoard, and Henrik Gram
2215 (henrikg@@funcom.com) added it to WinBoard.  Frank McIngvale added
2216 click/click moving, the Analysis modes, piece flashing, ZIICS import,
2217 and ICS text colorization to XBoard.  Jochen Wiedmann ported XBoard to
2218 the Amiga, creating AmyBoard, and converted the documentation to
2219 texinfo.  Elmar Bartel contributed the new piece bitmaps introduced in
2220 version 3.2.  John Chanak contributed the initial implementation of
2221 ICS mode.  The color scheme and the old 80x80 piece bitmaps were taken
2222 from Wayne Christopher's @code{XChess} program.
2223
2224 Chris Sears and Dan Sears wrote the original XBoard.  They were
2225 responsible for versions 1.0 through 1.2.
2226
2227 Evan Welsh wrote @code{CMail}.  Patrick Surry helped in designing,
2228 testing, and documenting CMail.
2229
2230 @node CMail
2231 @chapter CMail
2232 @cindex cmail
2233 The @file{cmail} program can help you play chess by email with opponents of
2234 your choice using XBoard as an interface.
2235
2236 You will usually run @file{cmail} without giving any options.
2237
2238 @menu
2239 * CMail options::    Invoking CMail.
2240 * CMail game::       Starting a CMail game.
2241 * CMail answer::     Answering a move.
2242 * CMail multi::      Multiple games in one message.
2243 * CMail completion:: Completing a game.
2244 * CMail trouble::    Known CMail problems.
2245 @end menu
2246
2247 @node CMail options
2248 @section CMail options
2249 @table @asis
2250 @item -h
2251 Displays @file{cmail} usage information.
2252 @item -c
2253 Shows the conditions of the GNU General Public License.
2254 @xref{Copying}.
2255 @item -w
2256 Shows the warranty notice of the GNU General Public License.
2257 @xref{Copying}.
2258 @item -v
2259 @itemx -xv
2260 Provides or inhibits verbose output from @file{cmail} and XBoard,
2261 useful for debugging. The
2262 @code{-xv}
2263 form also inhibits the cmail introduction message.
2264 @item -mail
2265 @itemx -xmail
2266 Invokes or inhibits the sending of a mail message containing the move.
2267 @item -xboard
2268 @itemx -xxboard
2269 Invokes or inhibits the running of XBoard on the game file.
2270 @item -reuse
2271 @itemx -xreuse
2272 Invokes or inhibits the reuse of an existing XBoard to display the
2273 current game.
2274 @item -remail
2275 Resends the last mail message for that game. This inhibits running
2276 XBoard.
2277 @item -game <name>
2278 The name of the game to be processed.
2279 @item -wgames <number>
2280 @itemx -bgames <number>
2281 @itemx -games <number>
2282 Number of games to start as White, as Black or in total. Default is 1 as
2283 white and none as black. If only one color is specified then none of the
2284 other color is assumed. If no color is specified then equal numbers of
2285 White and Black games are started, with the extra game being as White if an
2286 odd number of total games is specified.
2287 @item -me <short name>
2288 @itemx -opp <short name>
2289 A one-word alias for yourself or your opponent.
2290 @item -wname <full name>
2291 @itemx -bname <full name>
2292 @itemx -name <full name>
2293 @itemx -oppname <full name>
2294 The full name of White, Black, yourself or your opponent.
2295 @item -wna <net address>
2296 @itemx -bna <net address>
2297 @itemx -na <net address>
2298 @itemx -oppna <net address>
2299 The email address of White, Black, yourself or your opponent.
2300 @item -dir <directory>
2301 The directory in which @file{cmail} keeps its files. This defaults to the
2302 environment variable @code{$CMAIL_DIR} or failing that, @code{$CHESSDIR},
2303 @file{$HOME/Chess} or @file{~/Chess}. It will be created if it does not exist.
2304 @item -arcdir <directory>
2305 The directory in which @file{cmail} archives completed games. Defaults to
2306 the environment variable @code{$CMAIL_ARCDIR} or, in its absence, the same
2307 directory as cmail keeps its working files (above).
2308 @item -mailprog <mail program>
2309 The program used by cmail to send email messages. This defaults to the
2310 environment variable @code{$CMAIL_MAILPROG} or failing that
2311 @file{/usr/ucb/Mail}, @file{/usr/ucb/mail} or @file{Mail}. You will need
2312 to set this variable if none of the above paths fit your system.
2313 @item -gamesFile <file>
2314 @cindex .cmailgames
2315 A file containing a list of games with email addresses. This defaults to
2316 the environment variable @code{$CMAIL_GAMES} or failing that
2317 @file{.cmailgames}.
2318 @item -aliasesFile <file>
2319 @cindex .cmailaliases
2320 A file containing one or more aliases for a set of email addresses. This
2321 defaults to the environment variable @code{$CMAIL_ALIASES} or failing
2322 that @file{.cmailaliases}.
2323 @item -logFile <file>
2324 A file in which to dump verbose debugging messages that are invoked with
2325 the @samp{-v}
2326 option.
2327 @item -event <event>
2328 The PGN Event tag (default @samp{Email correspondence game}).
2329 @item -site <site>
2330 The PGN Site tag (default @samp{NET}).
2331 @item -round <round>
2332 The PGN Round tag (default @samp{-}, not applicable).
2333 @item -mode <mode>
2334 The PGN Mode tag (default @samp{EM}, Electronic Mail).
2335 @item Other options
2336 Any option flags not listed above are passed through to XBoard.
2337 Invoking XBoard through CMail changes the default values of two XBoard
2338 options: The default value for @samp{-noChessProgram} is changed to
2339 true; that is, by default no chess engine is started.  The default
2340 value for @samp{-timeDelay} is changed to 0; that is, by default
2341 XBoard immediately goes to the end of the game as played so far,
2342 rather than stepping through the moves one by one.  You can still set
2343 these options to whatever values you prefer by supplying them on
2344 CMail's command line.  @xref{Options}.
2345 @end table
2346
2347 @node CMail game
2348 @section Starting a CMail Game
2349 Type @file{cmail} from a shell to start a game as white. After an opening
2350 message, you will be prompted for a game name, which is optional---if you
2351 simply press @key{Enter}, the game name will take the form
2352 @samp{you-VS-opponent}. You will next be prompted for the short name
2353 of your opponent. If you haven't played this person before, you will also
2354 be prompted for his/her email address. @file{cmail} will then invoke
2355 XBoard in the background. Make your first move and select
2356 @samp{Mail Move} from the @samp{File} menu. @xref{File Menu}. If all is well,
2357 @file{cmail} will mail a copy of the move to your opponent. If you select
2358 @samp{Exit} without having selected @samp{Mail Move} then no move will be
2359 made.
2360
2361 @node CMail answer
2362 @section Answering a Move
2363 When you receive a message from an opponent containing a move in one of
2364 your games, simply pipe the message through @file{cmail}. In some mailers
2365 this is as simple as typing @kbd{| cmail} when viewing the message, while in
2366 others you may have to save the message to a file and do @kbd{cmail < file}
2367 at the command line. In either case @file{cmail} will display the game using
2368 XBoard. If you didn't exit XBoard when you made your first move
2369 then @file{cmail} will do its best to use the existing XBoard instead
2370 of starting a new one. As before, simply make a move and select
2371 @samp{Mail Move} from the @samp{File} menu. @xref{File Menu}. @file{cmail}
2372 will try to use the
2373 XBoard that was most recently used to display the current game. This
2374 means that many games can be in progress simultaneously, each with its own
2375 active XBoard.
2376
2377 If you want to look at the history or explore a variation, go ahead, but
2378 you must return to the current position before XBoard will allow you
2379 to mail a move. If you edit the game's history you must select
2380 @samp{Reload Same Game} from the @samp{File} menu to get back to the original
2381 position, then make the move you want and select @samp{Mail Move}.
2382 As before, if you decide you aren't ready to make a move just yet you can
2383 either select @samp{Exit} without sending a move or just leave
2384 XBoard running until you are ready.
2385
2386 @node CMail multi
2387 @section Multi-Game Messages
2388
2389 It is possible to have a @file{cmail} message carry more than one game.
2390 This feature was implemented to handle IECG (International Email Chess
2391 Group) matches, where a match consists of one game as white and one as black,
2392 with moves transmitted simultaneously. In case there are more general uses,
2393 @file{cmail} itself places no limit on the number of black/white games
2394 contained in a message; however, XBoard does.
2395
2396 @node CMail completion
2397 @section Completing a Game
2398 Because XBoard can detect checkmate and stalemate, @file{cmail}
2399 handles game termination sensibly. As well as resignation, the
2400 @samp{Action} menu allows draws to be offered and accepted for
2401 @file{cmail} games.
2402
2403 For multi-game messages, only unfinished and just-finished games will be
2404 included in email messages. When all the games are finished, they are
2405 archived in the user's archive directory, and similarly in the opponent's
2406 when he or she pipes the final message through @file{cmail}. The archive
2407 file name includes the date the game was started.
2408
2409 @node CMail trouble
2410 @section Known CMail Problems
2411 It's possible that a strange conjunction of conditions may occasionally
2412 mean that @file{cmail} has trouble reactivating an existing
2413 XBoard. If this should happen, simply trying it again should work.
2414 If not, remove the file that stores the XBoard's PID
2415 (@file{game.pid}) or use the @samp{-xreuse} option to force
2416 @file{cmail} to start a new XBoard.
2417
2418 Versions of @file{cmail} after 2.16 no longer understand the old file format
2419 that XBoard used to use and so cannot be used to correspond with
2420 anyone using an older version.
2421
2422 Versions of @file{cmail} older than 2.11 do not handle multi-game messages,
2423 so multi-game correspondence is not possible with opponents using an older
2424 version.
2425
2426 @node Other programs
2427 @chapter Other programs you can use with XBoard
2428 @cindex Other programs
2429
2430 Here are some other programs you can use with XBoard
2431
2432 @menu
2433 * GNU Chess::        The GNU Chess engine.
2434 * Crafty::           The Crafty chess engine.
2435 * zic2xpm::          The program used to import chess sets from ZIICS.
2436 @end menu
2437
2438 @node GNU Chess
2439 @section GNU Chess
2440
2441 The GNU Chess engine is available from:
2442
2443 ftp://ftp.gnu.org/gnu/gnuchess/
2444
2445 You can use XBoard to play a game against GNU Chess, or to
2446 interface GNU Chess to an ICS.
2447
2448 @node Crafty
2449 @section Crafty
2450
2451 Crafty is a chess engine written by Bob Hyatt.
2452 You can use XBoard to play a game against Crafty, hook Crafty up
2453 to an ICS, or use Crafty to interactively analyze games and positions
2454 for you.
2455
2456 Crafty is a strong, rapidly evolving chess program. This rapid
2457 pace of development is good, because it means Crafty is always
2458 getting better.  This can sometimes cause problems with
2459 backwards compatibility, but usually the latest version of Crafty
2460 will work well with the latest version of XBoard.
2461 Crafty can be obtained from its author's FTP site:
2462 ftp://ftp.cis.uab.edu/hyatt/.
2463
2464 To use Crafty with XBoard, give the -fcp and -fd options as follows, where
2465 <crafty's directory> is the directory in which you installed Crafty
2466 and placed its book and other support files.
2467
2468 @node zic2xpm
2469 @section zic2xpm
2470
2471 The ``zic2xpm'' program is used to import chess sets from the ZIICS(*)
2472 program into XBoard. ``zic2xpm'' is part of the XBoard distribution.
2473 ZIICS is available from:
2474
2475 ftp://ftp.freechess.org/pub/chess/DOS/ziics131.exe
2476
2477 To import ZIICS pieces, do this:
2478 @table @asis
2479 @item 1. Unzip ziics131.exe into a directory:
2480
2481 @example
2482 unzip -L ziics131.exe -d ~/ziics
2483 @end example
2484 @item 2. Use zic2xpm to convert a set of pieces to XBoard format.
2485
2486 For example, let's say you want to use the
2487 FRITZ4 set. These files are named ``fritz4.*'' in the ZIICS distribution.
2488
2489 @example
2490 mkdir ~/fritz4
2491 cd ~/fritz4
2492 zic2xpm ~/ziics/fritz4.*
2493 @end example
2494 @item 3. Give XBoard the ``-pixmap'' option when starting up, e.g.:
2495
2496 @example
2497 xboard -pixmap ~/fritz4
2498 @end example
2499
2500 Alternatively, you can add this line to your .Xdefaults file:
2501
2502 @example
2503 xboard*pixmapDirectory: ~/fritz4
2504 @end example
2505 @end table
2506
2507 (*) ZIICS is a separate copyrighted work of Andy McFarland.
2508 The ``ZIICS pieces'' are copyrighted works of their respective
2509 creators. Files produced by ``zic2xpm'' are for PERSONAL USE ONLY
2510 and may NOT be redistributed without explicit permission from
2511 the original creator(s) of the pieces.
2512
2513 @ifnottex
2514 @node Copyright
2515 @unnumbered Copyright
2516 @include copyright.texi
2517 @end ifnottex
2518
2519 @node Copying
2520 @unnumbered GNU GENERAL PUBLIC LICENSE
2521 @include gpl.texinfo
2522
2523 @c noman
2524 @node Index
2525 @unnumbered Index
2526
2527 @printindex cp
2528 @contents
2529 @c end noman