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