chiark / gitweb /
Remove CVS subdirectories
[sympathy.git] / sympathy.man
1 .TH sympathy 1  "After March 12, 2008" "Version 1.2.1 + Edits" "USER COMMANDS"
2 .\" $Id: sympathy.1,v 1.28 2008/05/09 12:31:55 james Exp $
3 .SH NAME
4 sympathy \- client/server terminal emulator with logging
5 .SH SYNOPSIS
6 .B sympathy \-\fBt\fP
7 [
8 .B \fIterminal_options\fP
9 ] [
10 .B \fIdisplay_options\fP
11 ]
12 .br
13 .B sympathy \-\fBs\fP
14 [
15 .B \fIterminal_options\fP
16 ] [
17 .B \fIserver_options\fP
18 ]
19 .br
20 .B sympathy 
21 [
22 .B \-\fBc\fP \-\fBs\fP
23 ] [
24 .B \fIterminal_options\fP
25 ] [
26 .B \fIserver_options\fP
27 ] [
28 .B \fIclient_options\fP
29 ] [
30 .B \fIdisplay_options\fP
31 ]
32 .br
33 .B sympathy \-\fBc\fP
34 [
35 .B \fIclient_options\fP
36 ] [
37 .B \fIdisplay_options\fP
38
39 .br
40 .B sympathy \-\fBr\fP
41 id
42 [
43 .B \fIclient_options\fP
44 ] [
45 .B \fIdisplay_options\fP
46
47 .br
48 .B sympathy \-\fBC\fP \-\fBd\fP
49 serialdev 
50 .br
51 .B sympathy \-\fBls\fP
52 .br
53 .B sympathy \-\fBv\fP
54 .br
55 .SH DESCRIPTION
56 .I Sympathy
57 is a replacement for screen(1), minicom(1) and consolidate(1). It
58 is a VT52/VT100/ANSI terminal emulator with some special features. In normal use
59 .I sympathy
60 would sit between a terminal device (a serial port or a pseudo-tty) and
61 the user's usual terminal emulator (eg xterm(1)). 
62 .I Sympathy
63 renders data from the terminal device into an internal frame buffer
64 and then expresses changes in this frame buffer to the outer terminal
65 emulator using a small subset of ANSI escape codes. 
66 .I Sympathy 
67 always generates valid escape codes to the outer terminal, and will 
68 reset the state of its internal terminal emulator when it detects
69 receive errors on the terminal device.
70 .PP
71 .I Sympathy\fP,
72 unlike screen(1), takes care to preserve the scroll-back features
73 of the outer terminal emulator: lines that scroll off the top of the internal 
74 frame buffer are scrolled off the top of the outer terminal emulator. When
75 .I sympathy 
76 is used in client/server mode, some history is added to the outer 
77 terminal emulator when the client connects.
78 .PP
79 .I Sympathy
80 also supports automatic baud\-rate detection, and advanced logging features.
81 .I Sympathy
82 logs whenever any of the modem control lines change state, receive errors,
83 and the contents
84 of any line on the frame buffer as the cursor moves off it.
85 .SH OPTIONS
86 .B \fImajor mode options\fP:
87 .TP 5
88 .B \-C\fP 
89 clear lock files
90 .I sympathy 
91 will remove inactive lockfiles for the specified serial device, and then exit.
92 .TP 5
93 .B \-c\fP or \fB\-r\fP \fIid\fP
94 act as client only:
95 .I sympathy
96 connects to a 
97 .I sympathy 
98 server process and injects the history into the outer terminal
99 emulator,
100 and connects the user with the terminal device. One server process can support multiple 
101 client processes. This mode can also be used to obtain a dump of the current screen
102 in HTML format (see the \-\fBH\fP option), inject key\-presses (see \-\fBI\fP)
103 or allow control via a dumb terminal (see \-\fBN\fP).
104 The \-\fPr\fP option connects to a
105 server process socket called \fIid\fP, or if \fIid\fP is an integer
106 \fIhost-name\fP.\fIid\fP mimicking the behaviour of screen(1). 
107 .I Sympathy
108 searches for the socket in the following directories: \fI~/.sympathy\fP, 
109 \fI~/sympathy\fP, \fI/etc/sympathy\fP, \fI/var/sympathy\fP.
110 With the \-\fBc\fP option the socket must be specified with the \-\fBk\fP
111 option.
112 .TP 5
113 .B \fP[\fB \-c \-s \fP]
114 act as both client and server:
115 .I sympathy
116 forks. The child process becomes a server, and the original process becomes a client
117 which then connects to the server. This is the default major mode if no other is specified. 
118 Since the default terminal device is a pseudo-tty, running 
119 .I sympathy
120 with no arguments will start a new shell in a daemonised process and connect to it
121 as a client from the original process, mimicking the behaviour of screen(1)
122 .TP 5 
123 .B \-l\fP or \fB\-ls
124 show active sockets:
125 .I sympathy 
126 will show active sockets, ones to which a call to connect(2) succeeds, 
127 in ~/.sympathy. If the socket name begins with the host-name of the machine, and
128 the call to connect(2) fails, then socket will be unlinked. 
129 .TP 5
130 .B \-s
131 act as server only:
132 .I sympathy
133 opens the terminal device and renders into an internal frame buffer, listens for clients
134 on the socket and logs activity. By default the server will fork into a daemon process
135 but can be forced to remain in the foreground with the \-\fBF\fP option.
136 .TP 5
137 .B \-t
138 act as terminal emulator only:
139 .I sympathy
140 opens the terminal device and outputs into the outer terminal emulator. When 
141 .I sympathy exits the 
142 device is closed and no process remains. In this mode 
143 .I sympathy
144 behaves like a traditional
145 terminal emulator such as cu(1) or minicom(1).
146 .TP 5 
147 .B \-v
148 show current version:
149 .I sympathy 
150 will print the the version number of the code it was compiled from.
151 .TP 5
152 .B \-h
153 show help:
154 .I sympathy 
155 will show brief usage instructions
156 .PP
157 .B \fIterminal_options\fP:
158 .TP 5
159 .B \-d \fIserialdev\fP
160 connect to terminal device \fIserialdev\fP, eg /dev/ttyS0. 
161 By default 
162 .I sympathy
163 doesn't
164 lock the terminal device, but checks periodically for lock files of other processes. If 
165 .I sympathy
166 detects another lock file it displays \fBLocked\fP in the status line 
167 and refuses I/O on the device until the lock file is removed or becomes invalid.
168 To lock the device use the \-\fBK\fP option. 
169 .I Sympathy 
170 will in addition check that the name of the device does not occur in /proc/cmdline
171 as an argument to the \fIconsole\fP kernel parameter. 
172 The \-\fBd\fP option is incompatible with the \-\fBp\fP option. 
173 .TP 5
174 .B \-p
175 connect to a pseudo\-tty instead of a terminal device, and fork a login shell in
176 it. The \-\fBp\fP option is incompatible with the \-\fBd\fP option. This is the default 
177 terminal device if none is specified. The first non\-option command line
178 arugment is considered to be the a binary to run in the pseudo\-tty, subsequent
179 arguments are parsed to the binary. The current value of PATH is searched for
180 the binary if it does not start with '/'. If no binary is specified 
181 then '/bin/sh' is called with \fIargv[0]\fP set to '\-'.  
182 .TP 5
183 .B \-K
184 lock the terminal device specified in the \-\fBd\fP option. 
185 .I Sympathy
186 generates lock files in a staggering variety of formats and places. For locks
187 based on the name of the device 
188 .I sympathy 
189 generates lock files for all devices
190 with the same major and minor in /dev, /dev/usb and /dev/tts, it uses both
191 normal and lower case and replaces occurrences of `/' in the device name with
192 both `.' and `_'.
193 .I Sympathy
194 also generates locks based on the device major and minor numbers, and for all lock file
195 names generates them in any of the following directories that are writable:
196 /var/lock/uucp, /var/spool/lock, /var/spool/uucp, /etc/locks, /usr/spool/uucp, 
197 /var/spool/locks, /usr/spool/lock, /usr/spool/locks, /usr/spool/uucp/LCK, /var/lock. 
198 Lock files are assumed to be in HDB format.
199 .TP 5
200 .B \-b \fIbaud\-rate\fP
201 set the baud\-rate of the terminal device specified in the \-\fBd\fP to
202 \fIbaud\-rate\fP, if omitted the current baud\-rate of the serial port will be
203 used.
204 .TP 5
205 .B \-f
206 turn on flow control on the terminal device. This option adds \fICRTSCTS\fP to 
207 \fIsympathy\fP's default 
208 \fIc_cflag\fPs of \fICS8|CREAD|CLOCAL\fP.
209 .TP 5
210 .B \-L \fIlogfile\fP
211 log activity to the file \fIlogfile\fP. If \fIlogfile\fP is `-' then log to
212 \fIstdout\fP. Note that logging to \fIstdout\fP only makes sense with the
213 \-\fBF\fP \fIserver_option\fP. 
214 .I Sympathy 
215 will also close and reopen its log file when it receives a \fBSIGHUP\fP, which
216 with the \fB\-P\fP allows the use of logrotate(8).
217 .TP 5
218 .B \-P \fIpidfile\fP
219 write the pid of the server/terminal process to \fIpidfile\fP, which is 
220 removed on clean exit.
221 .TP 5
222 .B \-R
223 rotate log files. When the log\-file specified with the \fB\-L\fP option
224 grows large 
225 .I sympathy 
226 will rotate it and compress old log\-files. 
227 .TP 5
228 .B \-w \fIwidth\fP[x\fIheight\fP]
229 set the initial size of the terminal emulator's frame buffer to be \fIwidth\fP columns
230 by \fIheight\fP rows. If \fIheight\fP is omitted it defaults to 24, the default width
231 is 80. These values may
232 be overridden later by terminal escape sequences. If \-\fBp\fP is also specified
233 the pseudo-tty will have its window size set to match.
234 .PP
235 .B \fIdisplay_options\fP:
236 .TP 5
237 .B \-u
238 attempt to render Unicode characters in the internal frame buffer to the outer terminal 
239 emulator by using ISO-2202 sequences. 
240 .I Sympathy
241 currently only checks to see if an appropriate character appears in the VT102 
242 US character set, or in the VT102 `special characters and line drawing' character set.
243 If the character appears in neither of these then it will be rendered on the outer
244 terminal emulator as a `?'.
245 .TP 5
246 .B \-H
247 render the current state of the internal frame buffer to \fIstdout\fP as HTML, then quit.
248 .TP 5
249 .B \-N
250 don't render the internal frame buffer using ANSI characters, but instead write characters
251 that would be written to the screen to stdout. Take characters from stdin and send them
252 to the device. This feature is useful when you wish to use sympathy in conjunction with programs
253 like expect(1).
254 .PP
255 .B \fIclient_options\fP:
256 .TP 5
257 .B \-k \fIsocket\fP
258 set the name in the file-system of the socket to which
259 .I sympathy
260 should connect. This option is \fBmandatory\fP unless the \-\fBs\fP or \-\fBr\fP options
261 have also been given. If \-\fBs\fP is given then it will default to the socket which
262 the forked server process opens. See the discussion of the \-\fPr\fP option above, for
263 information on how 
264 .I sympathy 
265 chooses a socket name if \-\fBr\fP is specified.
266 .TP 5
267 .B \-I string
268 Inject \fIstring\fP to the device as if it had been typed at the keyboard.  Each character in 
269 the string is treated as a key\-press.
270 .I Sympathy
271 recognizes various common escapes for control characters. Other keys, for example the arrow keys,
272 are mapped to character codes between 128 and 255, see src/keys.h for details.
273 .PP
274 .B \fIserver_options\fP:
275 .TP 5
276 .B \-F
277 tells the 
278 .I sympathy
279 server process not to become a daemon but to remain the the foreground. This option is
280 incompatible with the \-\fBc\fP \-\fBs\fP major mode.
281 .TP 5
282 .B \-k \fIsocket\fP
283 set the name in the file-system of the socket on which
284 .I sympathy
285 should listen for clients. If this option is omitted 
286 .I sympathy 
287 will create a 
288 socket in ~/.sympathy, creating that directory if necessary, and named
289 \fIhost-name\fP.\fIpid\fP where \fIpid\fP is the process id of the 
290 .I sympathy
291 process that created the socket.
292 .TP 5
293 .B \-n \fInlines\fP
294 sets the number of lines of history that the server process stores to \fInlines\fP. When 
295 a client connects \fInlines\fP of history are injected into the outer terminal emulator
296 so that they can be seen when scrolling back. By default the server stores 200 lines of
297 history.
298 .TP 5
299 .B \-S
300 tells the 
301 .I sympathy
302 server process to log errors to syslog.
303 .SH OPERATION
304 When 
305 .I sympathy
306 is relaying data to the outer terminal emulator a reverse video status line 
307 will be visible at the bottom of the screen. The status line shows pertinent
308 information. The first item on the line reminds you what the current escape character
309 is, the second indicates the terminal device to which 
310 .I sympathy
311 is connected, and the third shows the current baud\-rate. Other messages are:
312 .TP 5
313 .B Flow
314 indicates that that RTS/CTS flow control is in operation on the terminal device.
315 .TP 5
316 .B RTS
317 indicates that the terminal device is asserting the RTS line which indicates that 
318 the local system is ready to accept data from the remote system. If RTS/CTS
319 flow control is in operation then the operating system or hardware may
320 de-assert RTS even if RTS is shown. See the section on SERIAL PORT THEORY for
321 more information.
322 .TP 5
323 .B CTS
324 indicates that the terminal device has detected that the local system's CTS
325 line is being asserted, indicating that the remote system is ready to receive
326 data from the local system. See the section on SERIAL PORT THEORY for
327 more information.
328 .TP 5
329 .B DTR
330 indicates that the terminal device is asserting the DTR line indicating that the local
331 system would like the local DCE to establish a connection to the remote
332 DCE.  See the section on SERIAL PORT THEORY for more information.
333 .TP 5
334 .B DSR
335 indicates that the terminal device has detected that the local system's DSR line is
336 being asserted, indicating that the local DCE is ready. See the section on
337 SERIAL PORT THEORY for more information.
338 .TP 5
339 .B CD
340 indicates that the terminal device has detected that the local system's CD line is
341 being asserted, indicating that the local DCE has a connection to the remote DCE.
342 See the section on SERIAL PORT THEORY for more information.
343 .TP 5
344 .B RI
345 indicates that the terminal device has detected that the local system's RI line is
346 being asserted, indicating that the DCE has detected a ringing signal or incoming 
347 connexion.
348 .TP 5
349 .B n clients
350 shows the number of connected client processes. In the \-\fBt\fP major mode, this will 
351 always be zero.
352 .TP 5
353 .B Locked
354 the terminal device was opened without the \-\fbK\fP flag and another process is
355 currently using it. I/O to the device is currently suspended until the process dies
356 or removes its lock file.
357 .TP 5
358 .B n errs
359 indicates the number of frames received by the terminal device with errors (indicating 
360 the wrong parity, baud\-rate or framing). The count resets if no errors are
361 detected by the device for 10 seconds.
362 .TP 5
363 .B try higher
364 .I Sympathy
365 thinks that you have set the wrong baud\-rate and is unable to determine the correct
366 one as the current baud\-rate is lower than the correct baud\-rate. Use the \fBbaud\fP command
367 to set a higher baud\-rate (eg 115200) and 
368 .I sympathy 
369 will try again.
370 .TP 5
371 .B try \fIrate\fBb 
372 .I Sympathy
373 thinks that you have set the wrong baud\-rate and thinks that the correct baud\-rate is
374 \fIrate\fP. Use the \fBbaud\fP command to change the current baud\-rate.
375 .SH COMMANDS
376 Commands are entered by sending the escape character, ascii(7) STX, from the outer terminal 
377 emulator (usually by pressing CTRL\-B), typing the command and pressing return. Whilst the
378 command is entered the status line changes to `:' and rudimentary line editing is available.
379 Whilst the command is entered the cursor \fBdoes not move\fP but remains where the terminal
380 emulator has placed it. Pressing the escape character whilst in command mode
381 will send the escape character to the terminal and cancel command mode. Valid
382 commands are:
383 .TP 7
384 .B ansi
385 switch from VT102 behaviour to ANSI behaviour. The most noticeable difference is 
386 the so\-called `xn' glitch.
387 .TP 7
388 .B noansi
389 switch from ANSI behaviour to VT102 behaviour.
390 .TP 7
391 .B baud \fInnnn\fB
392 set the current baud\-rate to nnnn
393 .TP 7
394 .B break
395 send the break signal by asserting the TX line for longer than a frame period.
396 .TP 7
397 .B flow
398 enable RTS/CTS flow control
399 .TP 7
400 .B noflow
401 disable RTS/CTS flow control
402 .TP 7
403 .B hangup
404 de-assert DTR for one second.
405 .TP 7
406 .B width \fInn\fB
407 set the current width of the screen to \fInn\fP, and reset the terminal emulator.
408 .TP 7
409 .B height \fInn\fB
410 set the current height of the screen to \fInn\fP, and reset the terminal emulator.
411 .TP 7
412 .B reset
413 reset the terminal emulator
414 .TP 7
415 .B expand
416 expand the size of the screen to fit the size of the current outer terminal emulator window
417 .TP 7
418 .B quit
419 exit this instance of 
420 .I sympathy 
421 (disconnect from the server if present)
422 .SH CHARACTER ENCODINGS
423 For characters between 32 and 126 
424 .I sympathy
425 interprets them as would a VT102 terminal by following the subset of ISO-2202 that 
426 the VT102 supports. Characters 128 thru 255 are assumed to be in UTF\-8(7), if
427 however the UTF\-8 is invalid they will instead be interpreted as characters
428 from ISO_8859-1(7). Character 155 (0x9b) when not part of a valid UTF\-8 sequence
429 will be interpreted as the one byte CSI character.
430 .PP
431 For the outer terminal emulator 
432 .I sympathy 
433 by default issues the 
434 ESC % G sequence to select UTF\-8 mode and emits valid UTF-8. If the outer terminal
435 does not, however, support UTF\-8 use the \-\fBu\fP switch to force 
436 .I sympathy 
437 to use the VT102 subset of ISO-2202.
438 .SH LOG FILES
439 Log files are made exclusively in the UTF\-8 encoding. Each line in the log file
440 starts with the date and time at which the entry was made \- for example:
441 .IP
442 Feb 27 23:24:42.509440
443 .PP
444 .I Sympathy
445 logs a line to the file whenever the cursor leaves the line. Additionally 
446 .I sympathy
447 .IP \(bu 3
448 logs certain other events to the file: 
449 .IP \(bu 3
450 serial port parameter changes: baud\-rate and flow control.
451 .IP \(bu 3
452 serial port control line state changes.
453 .IP \(bu 3
454 serial port line discipline errors.
455 .IP \(bu 3
456 serial port errors.
457 .IP \(bu 3
458 suggested baud rates and bit frequency analyses.
459 .IP \(bu 3
460 transmission of breaks.
461 .IP \(bu 3
462 sending of the hangup signal (dropping the DTR line).
463 .IP \(bu 3
464 unknown or un\-handled messages sent on the socket.
465 .IP \(bu 3
466 connexion and disconnexion of clients.
467 .IP \(bu 3
468 reception of SIGHUP.
469 .IP \(bu 3
470 invalid UTF-8 sequences.
471 .IP \(bu 3
472 terminal size changes
473 .IP \(bu 3
474 un\-handled terminal command sequences
475 .PP
476 The log file is rotated when it gets too large if the \fI\-R\fP option
477 is specified, and the log file is re-opened on receipt of a \fBSIGHUP\fP
478 which together with the \fB\-P\fP allows the use of of a program such
479 as logrotate(8)
480 .SH AUTOMATIC BAUD RATE ALGORITHM
481 If
482 .I sympathy
483 detects a framing error on the serial port it displays the count of
484 errors on the status line, and logs the error. 
485 .IP
486 <tty reports error: \\377 \\000 \\000>
487 .PP
488 The count is reset to zero after ten seconds
489 have elapsed during which no errors have occurred.
490 .I Sympathy 
491 looks at bit patterns of the characters received, and
492 measures the length (in units of the receiving UART's
493 bit period) of any runs of '1's delimited by '0's and vice\-versa. It
494 then calculates the statistics on the length of these runs, and logs these.
495 .IP
496 <tty_bit_analyse: 0000000001  [0,0,0,0,0,0,110,0,0,80]>
497 .PP
498 For a typical
499 stream of ASCII data, the most common run length will be the correct bit
500 period. 
501 .I Sympathy
502 uses this together with the current bit period to calculate the most probable
503 correct baud\-rate, which is displayed in the status line, and logged. 
504 If the correct baud\irate is higher than the current baud\-rate then the most common bit frequency will be '0' or '1' and the correct baud\-rate cannot be
505 determined. In this case sympathy will display and log the message 'try higher'.
506 .IP
507 <tty_analyse:     80 errors, current rate 115200b, suggest 19200b>
508 .PP
509 The algorithm only works well if the data stream is normal. If the data stream
510 is generated by the reception, at the wrong baud\-rate, of characters emitted 
511 by
512 .I sympathy
513 then the algorithm will be biased towards suggesting that the baud\-rate 
514 is too low. Noise on the line will also result in sympathy concluding that
515 the baud\-rate is too low.
516 .SH SIGNALS
517 .I Sympathy 
518 reacts to a set of signals. You can use the \fB-P\fP option
519 to easily determine the PID of the
520 .I sympathy
521 process to which you would like to send a signal.
522 .TP 8
523 .B SIGINT
524 .I Sympathy
525 will immediately try to restore the outer terminal emulator to its original
526 state and then exit.
527 .TP 8
528 .B SIGHUP
529 .I Sympathy
530 will close and reopen the log-file specified with the -L option, which allows
531 the use of programs like logrotate(8)
532 .TP 8
533 .B SIGWINCH
534 .I Sympathy
535 will redraw the display in the outer terminal emulator so that it will fit within
536 the new display size.
537 .TP 8
538 .B SIGCHLD
539 .I Sympathy
540 will wait for children if some were born (for example from compressing rotated logs)
541 .SH ENVIRONMENT
542 .I sympathy 
543 uses the \fBHOME\fP environment variable to determine the default
544 location for sockets.
545 .br
546 .I sympathy 
547 sets the value of \fBTERM\fP in pseudo-ttys spawned using the
548 \-\fBp\fP argument to `xterm'.
549 .br
550 .I Sympathy
551 will use \fBCSI ] 0 ;\fP to set the window title to the name of the
552 socket or device if \fBTERM\fP starts with \fIxterm\fP or \fIrxvt\fP.
553 .br
554 The \fBPATH\fP enviroment variable is searched for the binary to be run
555 in the pseudo\-tty.
556 .SH EMULATION
557 .I Sympathy
558 completely emulates a VT102 terminal (including the VT52 emulation). 
559 .I Sympathy 
560 also emulates a few extra sequences: the xterm(1) ESC ] ... sequences, and 
561 the ANSI CSI @ and CSI b sequences. The numeric keypad follows exactly the
562 sequences produced by an xterm rather than the exact VT102/VT220 sequences.
563 .I Sympathy
564 also recognises the ESC % G and the ESC % @ sequences to switch between ISO-2202
565 and UTF\-8 but ignores them (see CHARACTER ENCODING below)
566 .SH SERIAL PORT THEORY
567 A serial connexion was originally envisaged to connect a DTE (Data Terminal Equipment)
568 to a DCE (Data Circuit-terminating Equipment). The DCE (some sort of modem) would assert
569 the DTE's (the computer or terminal) DSR line to indicate it was ready. The DTE would
570 assert DTR to indicate to the DCE that it should attempt a connexion to the remote DCE.
571 Once a connexion was established the DCE would assert the DTE's CD pin. Data could then 
572 flow between the DTR and the remote DTE via the two DCEs. Flow control was provided
573 via the RTS and CTS lines. The DTE asserts RTS when it is capable of receiving new data,
574 and pauses its transmission of data when the CTS line is de-asserted. The local DCE
575 asserts CTS when the remote DCE detects RTS, and vice versa.
576 .PP
577 In modern usage the signals are slightly different, for a typical connexion using modems
578 DSR indicates that the modem is ready, a drop DTR is used to indicate to the
579 modem that it should break the connexion to the remote modem.  CD indicates that
580 the local modem is connected to the remote modem, and CTS and RTS behave as before. Connexion
581 is established by in-band signalling before CD is asserted.
582 .PP
583 For a \fBnull modem\fP cable local DSR and DTR are wired to remote CD, local
584 CTS to remote RTS, and local RTS to remote CTS. Thus asserting local DTR
585 asserts local DSR and remote CD, and asserting local RTS asserts remote CTS.
586 .PP
587 When RTS/CTS flow control is in operation and the receive buffer becomes full,
588 the operating system, or the hardware, de-asserts RTS, causing (via the DCEs or
589 the null modem cable) a de-assertion of remote CTS which in turn causes the
590 remote DTE to cease transmission.
591 .SH EXAMPLES
592 .PP 
593 using 
594 .I sympathy 
595 to mimic screen(1):
596 .IP
597 [foo@barhost ~]$ sympathy
598 .IP
599 .I Sympathy 
600 forks. The child becomes a daemon server and launches a new shell in a
601 pseudo-tty, the original process becomes a client and connects to the server
602 and shows the output. The user then uses the new shell and after some time
603 either hangs up on the client or issues CTRL\-B quit, and the client detaches from 
604 the server.
605 .IP
606 Later the user wishes to retrieve her session and to determine which sympathy
607 sessions are active and issues:
608 .IP
609 [foo@barhost ~]$ sympathy \-ls
610 .br
611         /home/foo/.sympathy/barhost.8843       (Active)
612 .br
613 [foo@barhost ~]$ 
614 .IP
615 The user then issues:
616 .IP
617 [foo@barhost ~]$ sympathy \-r 8843
618 .IP
619 and is reconnected to her session.
620 .PP
621 using sympathy to mimic minicom(1):
622 .IP
623 .IP
624 [foo@barhost ~]$ sympathy \-t \-d /dev/modem \-b 9600 \-K
625 .IP
626 .I Sympathy
627 opens the device /dev/modem and locks it, sets the baud\-rate to 9600 baud and disables
628 flow control. A VT102 terminal emulator then displays the data from the modem. The user
629 quits the emulator by issuing CTRL\-B quit, which unlocks the modem and exits 
630 .I sympathy.
631 .PP
632 using 
633 .I sympathy 
634 to mimic consolidate(1):
635 .IP
636 .IP
637 [foo@barhost ~]$ sympathy \-s \-d /dev/ttyS13 \-b 19200 \-K \-k /var/sympathy/13 \-L /var/sympathy/13.log -R
638 .IP
639 .I Sympathy
640 becomes a daemon and detaches from the current tty. It then opens the device
641 /dev/ttyS13 and locks it, sets the baud\-rate to 19200 baud and disables flow
642 control. 
643 .I Sympathy
644 then listens for clients connecting on the socket \fI/var/sympathy/13\fP, whilst logging 
645 completed lines and changes in status to the file \fI/var/sympathy/13.log\fP, 
646 rotating the log file when it gets too large.
647 .IP
648 A user wishing to see the current status of /dev/ttyS13 issues:
649 .IP
650 [foo@barhost ~]$ sympathy \-c \-k /var/sympathy/13 
651 .br
652 or
653 .br
654 [foo@barhost ~]$ sympathy \-r 13
655 .IP
656 and the last 200 lines of history are injected into the history of her outer
657 terminal emulator and she is connected to /dev/ttyS13. The user disconnects from the
658 server by issuing CTRL\-B quit.
659 .PP
660 using 
661 .I sympathy 
662 to mimic script(1):
663 .IP
664 .IP
665 [foo@barhost ~]$ sympathy \-t \-L typescript 
666 .IP
667 .I Sympathy
668 starts a shell in a ptty and logs completed lines to the file typescript. When the shell exits
669 .I sympathy
670 will terminate, or the user can press CTRL-B which will close the ptty and send a hangup 
671 to its controlling process.
672 .SH SEE ALSO
673 screen(1) minicom(1) consolidate(1)
674 .SH STANDARDS
675 ANSI X3.64, ISO-6429, ECMA-48, ISO-2202, ISO-8859, ISO-10646, Digital Equipment Corp. VT102.
676 .SH BUGS
677 .PD
678 .IP \(bu 3
679 The command editor and parser should support better line editing.
680 .IP \(bu 3
681 It should be possible to change the escape character.
682 .IP \(bu 3
683 The HTML generated with the \-\fBH\fP option is ugly.
684 .IP \(bu 3
685 No useful error message is generated if opening the terminal device fails in  the
686 \-\fBc\fP \-\fBs\fP major mode.
687 .SH AUTHOR
688 James McKenzie, james@fishsoup.dhs.org