744ff6fea12e053621576f2c864a746ff53fd437
[u/mdw/putty] / unix / pterm.1
1 .TH pterm 1
2 .UC
3 .SH NAME
4 pterm \- yet another X terminal emulator
5 .SH SYNOPSIS
6 \fBpterm\fP [ \fIoptions\fP ]
7 .SH DESCRIPTION
8 \fIpterm\fP is a terminal emulator for X. It is based on a port of
9 the terminal emulation engine in the Windows SSH client PuTTY.
10 .SH OPTIONS
11 The command-line options supported by \fIpterm\fP are:
12 .IP "\fB-e\fP \fIcommand\fP [ \fIarguments\fP ]"
13 Specify a command to be executed in the new terminal. Everything on
14 the command line after this option will be passed straight to the
15 \fIexecvp\fP system call; so if you need the command to redirect its
16 input or output, you will have to use \fIsh\fP:
17
18 pterm -e sh -c 'mycommand < inputfile'
19 .IP "\fB--display\fP \fIdisplay-name\fP"
20 Specify the X display on which to open \fIpterm\fP. (Note this
21 option has a double minus sign, even though none of the others do.
22 This is because this option is supplied automatically by GTK.
23 Sorry.)
24 .IP "\fB-name\fP \fIfont-name\fP"
25 Specify the name under which \fIpterm\fP looks up X resources.
26 Normally it will look them up as (for example) \fBpterm.Font\fP. If
27 you specify "-name xyz", it will look them up as \fBxyz.Font\fP
28 instead. This allows you to set up several different sets of
29 defaults and choose between them.
30 .IP "\fB-fn\fP \fIfont-name\fP"
31 Specify the font to use for normal text displayed in the terminal.
32 .IP "\fB-fb\fP \fIfont-name\fP"
33 Specify the font to use for bold text displayed in the terminal. If
34 the \fIBoldAsColour\fP resource is set to 1 (the default), bold text
35 will be displayed in different colours instead of a different font,
36 so this option will be ignored. If \fIBoldAsColour\fP is set to 0
37 and you do not specify a bold font, \fIpterm\fP will overprint the
38 normal font to make it look bolder.
39 .IP "\fB-geometry\fP \fIwidth\fPx\fIheight\fP"
40 Specify the size of the terminal, in rows and columns of text.
41 Unfortunately \fIpterm\fP does not currently support specifying the
42 initial position of the window.
43 .IP "\fB-sl\fP \fIlines\fP"
44 Specify the number of lines of scrollback to save off the top of the
45 terminal.
46 .IP "\fB-fg\fP \fIcolour\fP"
47 Specify the foreground colour to use for normal text.
48 .IP "\fB-bg\fP \fIcolour\fP"
49 Specify the background colour to use for normal text.
50 .IP "\fB-bfg\fP \fIcolour\fP"
51 Specify the foreground colour to use for bold text, if the
52 \fIBoldAsColour\fP resource is set to 1 (the default).
53 .IP "\fB-bbg\fP \fIcolour\fP"
54 Specify the foreground colour to use for bold reverse-video text, if
55 the \fIBoldAsColour\fP resource is set to 1 (the default). (This
56 colour is best thought of as the bold version of the background
57 colour; so it only appears when text is displayed \fIin\fP the
58 background colour.)
59 .IP "\fB-cfg\fP \fIcolour\fP"
60 Specify the foreground colour to use for text covered by the cursor.
61 .IP "\fB-cbg\fP \fIcolour\fP"
62 Specify the background colour to use for text covered by the cursor.
63 In other words, this is the main colour of the cursor.
64 .IP "\fB-T\fP \fItitle\fP"
65 Specify the initial title of the terminal window. (This can be
66 changed under control of the server.)
67 .IP "\fB-ut-\fP or \fB+ut\fP"
68 Tells \fIpterm\fP not to record your login in the \fIutmp\fP,
69 \fIwtmp\fP and \fIlastlog\fP system log files; so you will not show
70 up on \fIfinger\fP or \fIwho\fP listings, for example.
71 .IP "\fB-ut\fP"
72 Tells \fIpterm\fP to record your login in \fIutmp\fP, \fIwtmp\fP and
73 \fIlastlog\fP: this is the opposite of \fI-ut-\fP. This is the
74 default option: you will probably only need to specify it explicitly
75 if you have changed the default using the \fIStampUtmp\fP resource.
76 .IP "\fB-ls-\fP or \fB+ls\fP"
77 Tells \fIpterm\fP not to execute your shell as a login shell.
78 .IP "\fB-ls\fP"
79 Tells \fIpterm\fP to execute your shell as a login shell: this is
80 the opposite of \fI-ls-\fP. This is the default option: you will
81 probably only need to specify it explicitly if you have changed the
82 default using the \fILoginShell\fP resource.
83 .IP "\fB-sb-\fP or \fB+sb\fP"
84 Tells \fIpterm\fP not to display a scroll bar.
85 .IP "\fB-sb\fP"
86 Tells \fIpterm\fP to display a scroll bar: this is the opposite of
87 \fI-ls-\fP. This is the default option: you will probably only need
88 to specify it explicitly if you have changed the default using the
89 \fIScrollBar\fP resource.
90 .IP "\fB-log\fP \fIfilename\fP"
91 This option makes \fIpterm\fP log all the terminal output to a file
92 as well as displaying it in the terminal.
93 .IP "\fB-nethack\fP"
94 Tells \fIpterm\fP to enable NetHack keypad mode, in which the
95 numeric keypad generates the NetHack "hjklyubn" direction keys. This
96 enables you to play NetHack with the numeric keypad without having
97 to use the NetHack "number_pad" option (which requires you to press
98 "n" before any repeat count). So you can move with the numeric
99 keypad, and enter repeat counts with the normal number keys.
100 .IP "\fB-xrm\fP \fIresource-string\fP"
101 This option specifies an X resource string. Useful for setting
102 resources which do not have their own command-line options. For
103 example:
104
105 pterm -xrm 'ScrollbarOnLeft: 1'
106 .SH X RESOURCES
107 \fIpterm\fP can be more completely configured by means of X
108 resources. All of these resources are of the form \fIpterm.FOO\fP
109 for some FOO; you can make \fIpterm\fP look them up under another
110 name, such as \fIxyz.FOO\fP, by specifying the command-line option
111 "-name xyz".
112 .IP "\fBpterm.TerminalType\fP"
113 This controls the value set in the TERM environment variable inside
114 the new terminal. The default is "xterm".
115 .IP "\fBpterm.BackspaceIsDelete\fP"
116 This option should be set to either 0 or 1; the default is 1. When
117 set to 0, the ordinary Backspace key generates the Backspace
118 character (^H); when set to 1, it generates the Delete character
119 (^?). Whichever one you set, the terminal device inside \fIpterm\fP
120 will be set up to expect it.
121 .IP "\fBpterm.RXVTHomeEnd\fP"
122 This option should be set to either 0 or 1; the default is 0. When
123 it is set to 1, the Home and End keys generate the control sequences
124 they would generate in the \fIrxvt\fP terminal emulator, instead of
125 the more usual ones generated by other emulators.
126 .IP "\fBpterm.LinuxFunctionKeys\fP"
127 This option can be set to any number between 0 and 5 inclusive; the
128 default is 0. The modes vary the control sequences sent by the
129 function keys; for more complete documentation, it is probably
130 simplest to try each option in "pterm -e cat", and press the keys to
131 see what they generate.
132 .IP "\fBpterm.NoApplicationKeys\fP"
133 This option should be set to either 0 or 1; the default is 0. When
134 set to 1, it stops the server from ever switching the numeric keypad
135 into application mode (where the keys send function-key-like
136 sequences instead of numbers or arrow keys). You probably only need
137 this if some application is making a nuisance of itself.
138 .IP "\fBpterm.NoApplicationCursors\fP"
139 This option should be set to either 0 or 1; the default is 0. When
140 set to 1, it stops the server from ever switching the cursor keys
141 into application mode (where the keys send slightly different
142 sequences). You probably only need this if some application is
143 making a nuisance of itself.
144 .IP "\fBpterm.NoMouseReporting\fP"
145 This option should be set to either 0 or 1; the default is 0. When
146 set to 1, it stops the server from ever enabling mouse reporting
147 mode (where mouse clicks are sent to the application instead of
148 controlling cut and paste).
149 .IP "\fBpterm.NoRemoteResize\fP"
150 This option should be set to either 0 or 1; the default is 0. When
151 set to 1, it stops the server from being able to remotely control
152 the size of the \fIpterm\fP window.
153 .IP "\fBpterm.NoAltScreen\fP"
154 This option should be set to either 0 or 1; the default is 0. When
155 set to 1, it stops the server from using the "alternate screen"
156 terminal feature, which lets full-screen applications leave the
157 screen exactly the way they found it.
158 .IP "\fBpterm.NoRemoteWinTitle\fP"
159 This option should be set to either 0 or 1; the default is 0. When
160 set to 1, it stops the server from remotely controlling the title of
161 the \fIpterm\fP window.
162 .IP "\fBpterm.NoDBackspace\fP"
163 This option should be set to either 0 or 1; the default is 0. When
164 set to 1, it disables the normal action of the Delete (^?) character
165 when sent from the server to the terminal, which is to move the
166 cursor left by one space and erase the character now under it.
167 .IP "\fBpterm.ApplicationCursorKeys\fP"
168 This option should be set to either 0 or 1; the default is 0. When
169 set to 1, the default initial state of the cursor keys are
170 application mode (where the keys send function-key-like sequences
171 instead of numbers or arrow keys). When set to 0, the default state
172 is the normal one.
173 .IP "\fBpterm.ApplicationKeypad\fP"
174 This option should be set to either 0 or 1; the default is 0. When
175 set to 1, the default initial state of the numeric keypad is
176 application mode (where the keys send function-key-like sequences
177 instead of numbers or arrow keys). When set to 0, the default state
178 is the normal one.
179 .IP "\fBpterm.NetHackKeypad\fP"
180 This option should be set to either 0 or 1; the default is 0. When
181 set to 1, the numeric keypad operates in NetHack mode. This is
182 equivalent to the \fI-nethack\fP command-line option.
183 .IP "\fBpterm.Answerback\fP"
184 This option controls the string which the terminal sends in response
185 to receiving the ^E character ("tell me about yourself"). By default
186 this string is "PuTTY".
187 .IP "\fBpterm.HideMousePtr\fP"
188 This option should be set to either 0 or 1; the default is 0. When
189 it is set to 1, the mouse pointer will disappear if it is over the
190 \fIpterm\fP window and you press a key. It will reappear as soon as
191 you move it.
192 .IP "\fBpterm.WindowBorder\fP"
193 This option controls the number of pixels of space between the text
194 in the \fIpterm\fP window and the window frame. The default is 1.
195 You can increase this value, but decreasing it to 0 is not
196 recommended because it can cause the window manager's size hints to
197 work incorrectly.
198 .IP "\fBpterm.CurType\fP"
199 This option should be set to either 0, 1 or 2; the default is 0.
200 When set to 0, the text cursor displayed in the window is a
201 rectangular block. When set to 1, the cursor is an underline; when
202 set to 2, it is a vertical line.
203 .IP "\fBpterm.BlinkCur\fP"
204 This option should be set to either 0 or 1; the default is 0. When
205 it is set to 1, the text cursor will blink when the window is active.
206 .IP "\fBpterm.Beep\fP"
207 This option should be set to either 0 or 2 (yes, 2); the default is
208 0. When it is set to 2, \fIpterm\fP will respond to a bell character
209 (^G) by flashing the window instead of beeping.
210 .IP "\fBpterm.BellOverload\fP"
211 This option should be set to either 0 or 1; the default is 0. When
212 it is set to 1, \fIpterm\fP will watch out for large numbers of
213 bells arriving in a short time and will temporarily disable the bell
214 until they stop. The idea is that if you \fIcat\fP a binary file,
215 the frantic beeping will mostly be silenced by this feature and will
216 not drive you crazy.
217
218 The bell overload mode is activated by receiving N bells in time T;
219 after a further time S without any bells, overload mode will turn
220 itself off again.
221 .IP "\fBpterm.BellOverloadN\fP"
222 This option counts the number of bell characters which will activate
223 bell overload if they are received within a length of time T. The
224 default is 5.
225 .IP "\fBpterm.BellOverloadT\fP"
226 This option specifies the time period in which receiving N or more
227 bells will activate bell overload mode. It is measured in
228 microseconds, so (for example) set it to 1000000 for one second. The
229 default is 2000000 (two seconds).
230 .IP "\fBpterm.BellOverloadS\fP"
231 This option specifies the time period of silence required to turn
232 off bell overload mode. It is measured in microseconds, so (for
233 example) set it to 1000000 for one second. The default is 5000000
234 (five seconds of silence).
235 .IP "\fBpterm.ScrollbackLines\fP"
236 This option specifies how many lines of scrollback to save above the
237 visible terminal screen. The default is 200. This resource is
238 equivalent to the \fI-sl\fP command-line option.
239 .IP "\fBpterm.DECOriginMode\fP"
240 This option should be set to either 0 or 1; the default is 0. It
241 specifies the default state of DEC Origin Mode. (If you don't know
242 what that means, you probably don't need to mess with it.)
243 .IP "\fBpterm.AutoWrapMode\fP"
244 This option should be set to either 0 or 1; the default is 1. It
245 specifies the default state of auto wrap mode. When set to 1, very
246 long lines will wrap over to the next line on the terminal; when set
247 to 0, long lines will be squashed against the right-hand edge of the
248 screen.
249 .IP "\fBpterm.LFImpliesCR\fP"
250 This option should be set to either 0 or 1; the default is 0. When
251 set to 1, the terminal will return the cursor to the left side of
252 the screen when it receives a line feed character.
253 .IP "\fBpterm.WinTitle\fP"
254 This resource is the same as the \fI-T\fP command-line option: it
255 controls the initial title of the window. The default is "pterm".
256 .IP "\fBpterm.TermWidth\fP"
257 This resource is the same as the width part of the \fI-geometry\fP
258 command-line option: it controls the number of columns of text in
259 the window. The default is 80.
260 .IP "\fBpterm.TermHeight\fP"
261 This resource is the same as the width part of the \fI-geometry\fP
262 command-line option: it controls the number of columns of text in
263 the window. The defaults is 24.
264 .IP "\fBpterm.Font\fP"
265 This resource is the same as the \fI-fn\fP command-line option: it
266 controls the font used to display normal text. The default is
267 "fixed".
268 .IP "\fBpterm.BoldFont\fP"
269 This resource is the same as the \fI-fb\fP command-line option: it
270 controls the font used to display bold text when \fIBoldAsColour\fP
271 is turned off. The default is unset (the font will be bolded by
272 printing it twice at a one-pixel offset).
273 .IP "\fBpterm.BoldAsColour\fP"
274 This option should be set to either 0 or 1; the default is 1. It
275 specifies the default state of auto wrap mode. When set to 1, bold
276 text is shown by displaying it in a brighter colour; when set to 0,
277 bold text is shown by displaying it in a heavier font.
278 .IP "\fBpterm.Colour0\fP, \fBpterm.Colour1\fP, ..., \fBpterm.Colour21\fP"
279 These options control the various colours used to display text in
280 the \fIpterm\fP window. Each one should be specified as a triple of
281 decimal numbers giving red, green and blue values: so that black is
282 "0,0,0", white is "255,255,255", red is "255,0,0" and so on.
283
284 Colours 0 and 1 specify the foreground colour and its bold
285 equivalent (the \fI-fg\fP and \fI-bfg\fP command-line options).
286 Colours 2 and 3 specify the background colour and its bold
287 equivalent (the \fI-bg\fP and \fI-bbg\fP command-line options).
288 Colours 4 and 5 specify the text and block colours used for the
289 cursor (the \fI-cfg\fP and \fI-cbg\fP command-line options). Each
290 even number from 6 to 20 inclusive specifies the colour to be used
291 for one of the ANSI primary colour specifications (black, red,
292 green, yellow, blue, magenta, cyan, white, in that order); the odd
293 numbers from 7 to 21 inclusive specify the bold version of each
294 colour, in the same order. The defaults are:
295
296 .nf
297 pterm.Colour0: 187,187,187
298 pterm.Colour1: 255,255,255
299 pterm.Colour2: 0,0,0
300 pterm.Colour3: 85,85,85
301 pterm.Colour4: 0,0,0
302 pterm.Colour5: 0,255,0
303 pterm.Colour6: 0,0,0
304 pterm.Colour7: 85,85,85
305 pterm.Colour8: 187,0,0
306 pterm.Colour9: 255,85,85
307 pterm.Colour10: 0,187,0
308 pterm.Colour11: 85,255,85
309 pterm.Colour12: 187,187,0
310 pterm.Colour13: 255,255,85
311 pterm.Colour14: 0,0,187
312 pterm.Colour15: 85,85,255
313 pterm.Colour16: 187,0,187
314 pterm.Colour17: 255,85,255
315 pterm.Colour18: 0,187,187
316 pterm.Colour19: 85,255,255
317 pterm.Colour20: 187,187,187
318 pterm.Colour21: 255,255,255
319 .fi
320 .IP "\fBpterm.RectSelect\fP"
321 This option should be set to either 0 or 1; the default is 0. When
322 set to 0, dragging the mouse over several lines selects to the end
323 of each line and from the beginning of the next; when set to 1,
324 dragging the mouse over several lines selects a rectangular region.
325 In each case, holding down Alt while dragging gives the other
326 behaviour.
327 .IP "\fBpterm.MouseOverride\fP"
328 This option should be set to either 0 or 1; the default is 1. When
329 set to 1, if the application requests mouse tracking (so that mouse
330 clicks are sent to it instead of doing selection), holding down
331 Shift will revert the mouse to normal selection. When set to 0,
332 mouse tracking completely disables selection.
333 .IP "\fBpterm.Printer\fP"
334 This option is unset by default. If you set it, then
335 server-controlled printing is enabled: the server can send control
336 sequences to request data to be sent to a printer. That data will be
337 piped into the command you specify here; so you might want to set it
338 to "lpr", for example, or "lpr -Pmyprinter".
339 .IP "\fBpterm.ScrollBar\fP"
340 This option should be set to either 0 or 1; the default is 1. When
341 set to 0, the scrollbar is hidden (although Shift-PageUp and
342 Shift-PageDown still work). This is the same as the \fI-sb\fP
343 command-line option.
344 .IP "\fBpterm.ScrollbarOnLeft\fP"
345 This option should be set to either 0 or 1; the default is 0. When
346 set to 1, the scrollbar will be displayed on the left of the
347 terminal instead of on the right.
348 .IP "\fBpterm.ScrollOnKey\fP"
349 This option should be set to either 0 or 1; the default is 0. When
350 set to 1, any keypress causes the position of the scrollback to be
351 reset to the very bottom.
352 .IP "\fBpterm.ScrollOnDisp\fP"
353 This option should be set to either 0 or 1; the default is 1. When
354 set to 1, any activity in the display causes the position of the
355 scrollback to be reset to the very bottom.
356 .IP "\fBpterm.BCE\fP"
357 This option should be set to either 0 or 1; the default is 1. When
358 set to 1, the various control sequences that erase parts of the
359 terminal display will erase in whatever the current background
360 colour is; when set to 0, they will erase in black always.
361 .IP "\fBpterm.BlinkText\fP"
362 This option should be set to either 0 or 1; the default is 0. When
363 set to 1, text specified as blinking by the server will actually
364 blink on and off; when set to 0, \fIpterm\fP will use the less
365 distracting approach of making the text's background colour bold.
366 .IP "\fBpterm.StampUtmp\fP"
367 This option should be set to either 0 or 1; the default is 1. When
368 set to 1, \fIpterm\fP will log the login in the various system log
369 files. This resource is equivalent to the \fI-ut\fP command-line
370 option.
371 .IP "\fBpterm.LoginShell\fP"
372 This option should be set to either 0 or 1; the default is 1. When
373 set to 1, \fIpterm\fP will execute your shell as a login shell. This
374 resource is equivalent to the \fI-ls\fP command-line option.
375 .SH BUGS
376 Most of the X resources have silly names. (Historical reasons from
377 PuTTY, mostly.)
378
379 Character-set switching and Unicode are not yet supported.