chiark / gitweb /
*** empty log message ***
[sympathy.git] / sympathy.1
1 .TH sympathy 1  "%VERSIONSTAMP%" "%LONGVERSION%" "USER COMMANDS"
2 .SH NAME
3 sympathy \- client/server terminal emulator with logging
4 .SH SYNOPSIS
5 .B sympathy \-\fBt\fP
6 [
7 .B \fIterminal_options\fP
8 ] [
9 .B \fIdisplay_options\fP
10 ]
11 .br
12 .B sympathy \-\fBs\fP
13 [
14 .B \fIterminal_options\fP
15 ] [
16 .B \fIserver_options\fP
17 ]
18 .br
19 .B sympathy 
20 [
21 .B \-\fBc\fP \-\fBs\fP
22 ] [
23 .B \fIterminal_options\fP
24 ] [
25 .B \fIserver_options\fP
26 ] [
27 .B \fIclient_options\fP
28 ]
29 .br
30 .B sympathy \-\fBc\fP
31 [
32 .B \fIclient_options\fP
33
34 .br
35 .B sympathy \-\fBr\fP
36 id
37 [
38 .B \fIclient_options\fP
39
40 .br
41 .B sympathy \-\fBv\fP
42 .br
43 .\"           "sympathy -t      [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-u]\n"
44 .\"           "sympathy -s      [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-u] [-k skt]\n"
45 .\"           "                      [-n hlines] [-w WxH] [-F]\n"
46 .\"           "sympathy [-s -c] [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-u] [-k skt]\n"
47 .\"           "                      [-n hlines] [-w WxH]\n"
48 .\"           "sympathy -c      [-H] [-u] -k skt\n"
49 .\"           "sympathy -r id   [-H] [-u]\n"
50 .\"           "sympathy {-l|-ls}\n"
51 .\"           "sympathy -v\n"
52 .\"           "sympathy -h\n"
53
54 .SH DESCRIPTION
55 .I Sympathy
56 is a VT52/VT100/ANSI terminal emulator with some special features. In normal use
57 .I sympathy
58 would sit between a terminal device (a serial port or a ptty) and
59 the user's usual terminal emaulator (eg xterm(1)). 
60 .I Sympathy
61 renders data from the terminal device into an internal frame buffer
62 and then expresses changes in this frame buffer to the outer terminal
63 emulator using a small subset of ANSI escape codes. 
64 .I Sympathy 
65 always generates valid escape codes to the outer terminal, and will 
66 reset the state of its internal terminal emulator when it detects
67 framing errors on the terminal device.
68 .PP
69 .I Sympathy\fP,
70 unlike screen(1), takes care to preserve the scrollback features
71 of the outer terminal emulator: lines that scroll of the top of the internal 
72 frame buffer are scrolled off the top of the outer terminal emaultor. When
73 sympathy is used in client/server mode, some history is added to the outer 
74 terminal emulator when the client connects.
75 .PP
76 .I Sympathy
77 also supports automatic baud rate detection, and advanced logging features.
78 .I Sympathy
79 logs whenever any of the modem control lines change state, receive errors,
80 and the contents
81 of any line on the frame buffer as the cursor moves off it.
82 .SH OPTIONS
83 .B \fImajor mode options\fP:
84 .TP 5
85 .B \-t
86 act as terminal emulator only:
87 .I sympathy
88 opens the terminal device and outputs into the outer terminal emulator, when sympathy exits the 
89 device is closed and no process remains. In this mode sympathy behaves like a traditional
90 terminal emulator such as cu(1) or minicom(1).
91 .TP 5
92 .B \-s
93 act as server only:
94 .I sympathy
95 opens the terminal device and renders into an internal frame buffer, listens for clients
96 on the socket and logs activity. By default the server will fork into a daemon processes
97 but can be forced to remain in the forground with the \-\fBF\fP option.
98 .TP 5
99 .B \-c\fP or \fB\-r\fP \fIid\fP
100 act as client only:
101 .I sympathy
102 connects to a sympathy server process and injects the history into the outer terminal
103 emulator,
104 and connects the user with the terminal device. One server process can support multiple 
105 client processes. This mode can also be used to obtain a dump of the current screen
106 in HTML format (see the \-\fBH\fP option). The \-\fPr\fP option connects to a server
107 on the socket ~/.sympathy/\fIid\fP  or if \fIid\fP is an integer 
108 ~/.sympathy/\fIhostname\fP.\fIid\fP mimicking the behaviour of screen(1). With the 
109 \-\fBc\fP option the socket must be specified with the \-\fBk\fP option.
110 .TP 5
111 .B \fP[\fB \-c \-s \fP]
112 act as both client and server:
113 .I sympathy
114 forks. The child process becomes a server, and the orginal process becomes a client
115 which then connects to the server. This is the default major mode if no other is specified. 
116 Since the default terminal device is a ptty, running 
117 .I sympathy
118 with no arguments will start a new shell in a daemonized process and connect to it
119 as a client from the original process, mimicking the behaviour of screen(1)
120 .TP 5 
121 .B \-l\fP or \fB\-ls
122 show active sockets:
123 .I sympathy 
124 will show active sockets, ones to which a call to connect(2) succeeds, 
125 in ~/.sympathy. If the socket name begins with the hostname of the machine, and
126 the call to connect(2) fails, then socket will be unlinked. 
127 .TP 5 
128 .B \-v
129 show current version:
130 .I sympathy 
131 will print the the version number of the code it was compiled with.
132 .TP 5
133 .B \-h
134 show help:
135 .I sympathy 
136 will show brief usage instructions
137 .PP
138 .B \fIterminal_options\fP:
139 .TP 5
140 .B \-d \fIserialdev\fP
141 connect to terminal device \fIserialdev\fP, eg /dev/ttyS0. 
142 By default 
143 .I sympathy
144 doesn't
145 lock the terminal device, but checks periodically for lock files of other processes. If 
146 sympathy detects another lock file it displays \fBLocked\fP in the status line 
147 and refuses I/O on the device until the lock file is removed or becomes invalid.
148 To lock the device use the \-\fBK\fP option. 
149 .I Sympathy 
150 will in addition check that the name of the device does not occur in /proc/cmdline
151 as an argument to the \fIconsole\fP kernel parameter. 
152 The \-\fBd\fP option is incompatible with the \-\fBp\fP option. 
153 .TP 5
154 .B \-p
155 connect to a pseudo-tty instead of a terminal device, and fork a login shell in
156 it. The \-\fBd\fP option is incompatible with the \-\fBd\fP option. This is the default 
157 terminal device if none is specified.
158 .TP 5
159 .B \-K
160 lock the terminal device specificed in the \-\fBd\fP option. 
161 .I Sympathy
162 generates lock files in a staggering variety of formats and places. For locks
163 based on the name of the device sympathy generates lock files for all devices
164 with the same major and minor in /dev, /dev/usb and /dev/tts, it uses both normal
165 and lower case and replaces occurances of '/' in the device name with both '.' and '_'.
166 .I Sympathy
167 also generates locks based on the device major and minor numbers, and for all lock file
168 names generates them in any of the follwoing directories that are writable:
169 /var/lock/uucp, /var/spool/lock, /var/spool/uucp, /etc/locks, /usr/spool/uucp, 
170 /var/spool/locks, /usr/spool/lock, /usr/spool/locks, /usr/spool/uucp/LCK, /var/lock. 
171 Lock files are assumed to be in HDB format.
172 .TP 5
173 .B \-b \fIbaudrate\fP
174 set the baud rate of the terminal device specificed in the \-\fBd\fP to baudrate, if omitted
175 the current baudrate of the serial port will be used.
176 .TP 5
177 .B \-f
178 turn on flow control on the terminal device. This option add \fICRTSCTS\fP to sympathy's default 
179 \fIc_cflag\fPs of \fICS8|CREAD|CLOCAL\fP.
180 .TP 5
181 .B \-L \fIlogfile\fP
182 log activity to the file \fIlogfile\fP. If \fIlogfile\fP is '-' then log to \fIstdout\fP. Note
183 that logging to \fIstdout\fP only makes sense with the \-\fBF\fP \fIserver_option\fP. 
184 .TP 5
185 .B \-w \fIwidth\fP[x\fIheight\fP]
186 set the initalize size of the terminal emulator's frame buffer to be \fIwidth\fP columns
187 by \fIheight\fP rows. If \fIheight\fP is ommited it defaults to 24, the default width
188 is 80. These values may
189 be overridden later by terminal escape sequences. If \-\fBp\fP is also specificed
190 the ptty will have its window size set to match.
191 .PP
192 .B \fIdisplay_options\fP:
193 .TP 5
194 .B \-u
195 attempt to render unicode characters in the internal frame buffer to the outer terminal 
196 emulator by using ISO-2202 sequences. 
197 .I Sympathy
198 currently only checks to see if an appropriate character appears in the VT102 
199 US character set, or in the VT102 'special characters and line drawing' character set.
200 If the character appears in neither of these then it will be rendered on the outer
201 terminal emulator as a '?'.
202 .TP 5
203 .B \-H
204 render the current state of the internal frame buffer to stdout as HTML, then quit.
205 .PP
206 .B \fIclient_options\fP:
207 .TP 5
208 .B -k \fIsocket\fP
209 set the name in the filesystem of the socket to which
210 .I sympathy
211 should connect. This option is \fBmanditory\fP unless the \-\fBs\fP or \-\fBr\fP options
212 have also been given. If \-\fBs\fP is given then it will default to the socket which
213 the forked server process opens. See the discusion of the \-\fPr\fP option above, for
214 information on how 
215 .I sympathy 
216 chooses a socket name if \-\fBr\fP is specified.
217 .PP
218 .B \fIserver_options\fP:
219 .TP 5
220 .B -k \fIsocket\fP
221 set the name in the filesystem of the socket on which
222 .I sympathy
223 should listen for clients. If this option is omitted 
224 .I sympathy 
225 will create a 
226 socket in ~/.sympathy, creating that directory if neccessary, and named
227 \fIhostname\fP.\fIpid\fP where \fIpid\fP is the process id of the 
228 .I sympathy
229 process that created the socket.
230 .TP 5
231 .B -F
232 tells the 
233 .I sympathy
234 server process not to become a daemon but to remain the the foreground. This option is
235 incompatible with the \-\fBc\fP \-\fBs\fP major mode.
236 .TP 5
237 .B -n \fInlines\fP
238 sets the number of lines of history that the server process stores to \fInlines\fP. When 
239 a client connects \fInlines\fP of history are injected into the outer terminal emulator
240 so that they can be seen when scrolling back. By default the server stores 200 lines of
241 history.
242 .SH OPERATION
243 When 
244 .I sympathy
245 is relaying data to the outer terminal emulator a reverse video status line 
246 will be visible at the bottom of the screen. The status line shows pertinent
247 information. The first item on the line reminds you what the current escape character
248 is, the second indicates the terminal device to which 
249 .I sympathy
250 is connected, and the third shows the current baudrate. Other messages are:
251 .TP 5
252 .B Flow
253 indicates that that RTS/CTS flow control is in operation on the terminal device.
254 .TP 5
255 .B RTS
256 indicates that the terminal device is asserting the RTS line which indicates that 
257 the local system is ready to accept data from the remote system. If RTS/CTS
258 flow control is in operation then the operating system or hardware may
259 de-assert RTS even if RTS is shown. See the section on SERIAL PORT THEORY for
260 more information.
261 .TP 5
262 .B CTS
263 indicates that the terminal device has detected that the local system's CTS
264 line is being asserted, indicating that the remote system is ready to receive
265 data from the local system. See the section on SERIAL PORT THEORY for
266 more information.
267 .TP 5
268 .B DTR
269 indicates that the terminal device is asserting the DTR line indicating that the local
270 system would like the local DCE to establish a connection to the remote
271 DCE.  See the section on SERIAL PORT THEORY for more information.
272 .TP 5
273 .B DSR
274 indicates that the terminal device has detected that the local system's DSR line is
275 being asserted, indicating that the local DCE is ready. See the section on
276 SERIAL PORT THEORY for more information.
277 .TP 5
278 .B CD
279 indicates that the terminal device has detected that the local system's CD line is
280 being asserted, indicating that the local DCE has a connection to the remote DCE.
281 See the section on SERIAL PORT THEORY for more information.
282 .TP 5
283 .B RI
284 indicates that the terminal device has detected that the local system's RI line is
285 being asserted, indicating that the DCE has detected a ringing signal or incoming 
286 connexion.
287 .TP 5
288 .B n clients
289 shows the number of connected client processes. In the \-\fBt\fP major mode, this will 
290 always be zero.
291 .TP 5
292 .B Locked
293 the terminal device was opened without the \-\fbK\fP flag and another process is
294 currently using it. I/O to the device is currently suspended until the process dies
295 or removes its lock file.
296 .TP 5
297 .B n errs
298 indicates the number of frames recived by the terminal device with errors (indicating 
299 the wrong parity, baud rate or framing). The count resets if no errors are
300 detected by the device for 10 seconds.
301 .TP 5
302 .B try higher
303 .I Sympathy
304 thinks that you have set the wrong baud rate and is unable to determine the correct
305 one as the current baud rate is lower than the correct baud rate. Use the \fBbaud\fP command
306 to set a higher baud rate (eg 115200) and sympathy will try again.
307 .TP 5
308 .B try \fIrate\fBb 
309 .I Sympathy
310 thinks that you have set the wrong baud rate and thinks that the correct baud rate is
311 \fIrate\fP. Use the \fBbaud\fP command to change the current baud rate.
312
313 .PP
314  you can send commands by sending
315 ascii(7) STX from the outer terminal emulator (usally by pressing CTRL-B). 
316
317 the s
318 .SH LOG FILES
319 .SH EXIT STATUS
320 .SH ENVIRONMENT
321 .SH SERIAL PORT THEORY
322 .SH FILES
323 .SH EXAMPLES
324 .SH ERRORS
325 .SH SEE ALSO
326 screen(1) minicom(1) consolidate(1)
327 .SH STANDARDS
328 .SH BUGS
329 .PD
330 .IP \(bu 3
331 when the \-\fBc\fP \-\fBs\fP major mode is used without the \-\fBk\fP option the pid
332 used in the socket is that of the client process and therefore not unique.
333 .IP \(bu 3
334 the HTML generated with the \-\fBH\fP option is ugly.
335 .SH SECURITY CONSIDERATIONS
336 .SH AUTHOR