First draft of Unicode support in pterm. It's pretty complete: it
[u/mdw/putty] / unix / pterm.1
... / ...
CommitLineData
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\-sb\-\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\-cs\fP \fIcharset\fP"
94This option specifies the character set in which \fIpterm\fP should
95assume the session is operating. This character set will be used to
96interpret all the data received from the session, and all input you
97type or paste into \fIpterm\fP will be converted into this character
98set before being sent to the session.
99
100Any character set name which is valid in a MIME header (and
101supported by \fIpterm\fP) should be valid here (examples are
102"ISO-8859-1", "windows-1252" or "UTF-8"). Also, any character
103encoding which is valid in an X logical font description should be
104valid ("ibm-cp437", for example).
105
106Character set names are case-insensitive.
107.IP "\fB\-nethack\fP"
108Tells \fIpterm\fP to enable NetHack keypad mode, in which the
109numeric keypad generates the NetHack "hjklyubn" direction keys. This
110enables you to play NetHack with the numeric keypad without having
111to use the NetHack "number_pad" option (which requires you to press
112"n" before any repeat count). So you can move with the numeric
113keypad, and enter repeat counts with the normal number keys.
114.IP "\fB\-xrm\fP \fIresource-string\fP"
115This option specifies an X resource string. Useful for setting
116resources which do not have their own command-line options. For
117example:
118
119pterm \-xrm 'ScrollbarOnLeft: 1'
120.IP "\fB\-help\fP, \fB\-\-help\fP"
121Display a message summarizing the available options
122.SH X RESOURCES
123\fIpterm\fP can be more completely configured by means of X
124resources. All of these resources are of the form \fIpterm.FOO\fP
125for some FOO; you can make \fIpterm\fP look them up under another
126name, such as \fIxyz.FOO\fP, by specifying the command-line option
127"\-name xyz".
128.IP "\fBpterm.CloseOnExit\fP"
129This option should be set to 0, 1 or 2; the default is 2. It
130controls what \fIpterm\fP does when the process running inside it
131terminates. When set to 2 (the default), \fIpterm\fP will close its
132window as soon as the process inside it terminates. When set to 0,
133\fIpterm\fP will print the process's exit status, and the window
134will remain present until a key is pressed (allowing you to inspect
135the scrollback, and copy and paste text out of it).
136
137When this setting is set to 1, \fIpterm\fP will close
138immediately if the process exits cleanly (with an exit status of
139zero), but the window will stay around if the process exits with a
140non-zero code or on a signal. This enables you to see what went
141wrong if the process suffers an error, but not to have to bother
142closing the window in normal circumstances.
143.IP "\fBpterm.TerminalType\fP"
144This controls the value set in the TERM environment variable inside
145the new terminal. The default is "xterm".
146.IP "\fBpterm.BackspaceIsDelete\fP"
147This option should be set to either 0 or 1; the default is 1. When
148set to 0, the ordinary Backspace key generates the Backspace
149character (^H); when set to 1, it generates the Delete character
150(^?). Whichever one you set, the terminal device inside \fIpterm\fP
151will be set up to expect it.
152.IP "\fBpterm.RXVTHomeEnd\fP"
153This option should be set to either 0 or 1; the default is 0. When
154it is set to 1, the Home and End keys generate the control sequences
155they would generate in the \fIrxvt\fP terminal emulator, instead of
156the more usual ones generated by other emulators.
157.IP "\fBpterm.LinuxFunctionKeys\fP"
158This option can be set to any number between 0 and 5 inclusive; the
159default is 0. The modes vary the control sequences sent by the
160function keys; for more complete documentation, it is probably
161simplest to try each option in "pterm \-e cat", and press the keys to
162see what they generate.
163.IP "\fBpterm.NoApplicationKeys\fP"
164This option should be set to either 0 or 1; the default is 0. When
165set to 1, it stops the server from ever switching the numeric keypad
166into application mode (where the keys send function-key-like
167sequences instead of numbers or arrow keys). You probably only need
168this if some application is making a nuisance of itself.
169.IP "\fBpterm.NoApplicationCursors\fP"
170This option should be set to either 0 or 1; the default is 0. When
171set to 1, it stops the server from ever switching the cursor keys
172into application mode (where the keys send slightly different
173sequences). You probably only need this if some application is
174making a nuisance of itself.
175.IP "\fBpterm.NoMouseReporting\fP"
176This option should be set to either 0 or 1; the default is 0. When
177set to 1, it stops the server from ever enabling mouse reporting
178mode (where mouse clicks are sent to the application instead of
179controlling cut and paste).
180.IP "\fBpterm.NoRemoteResize\fP"
181This option should be set to either 0 or 1; the default is 0. When
182set to 1, it stops the server from being able to remotely control
183the size of the \fIpterm\fP window.
184.IP "\fBpterm.NoAltScreen\fP"
185This option should be set to either 0 or 1; the default is 0. When
186set to 1, it stops the server from using the "alternate screen"
187terminal feature, which lets full-screen applications leave the
188screen exactly the way they found it.
189.IP "\fBpterm.NoRemoteWinTitle\fP"
190This option should be set to either 0 or 1; the default is 0. When
191set to 1, it stops the server from remotely controlling the title of
192the \fIpterm\fP window.
193.IP "\fBpterm.NoDBackspace\fP"
194This option should be set to either 0 or 1; the default is 0. When
195set to 1, it disables the normal action of the Delete (^?) character
196when sent from the server to the terminal, which is to move the
197cursor left by one space and erase the character now under it.
198.IP "\fBpterm.ApplicationCursorKeys\fP"
199This option should be set to either 0 or 1; the default is 0. When
200set to 1, the default initial state of the cursor keys are
201application mode (where the keys send function-key-like sequences
202instead of numbers or arrow keys). When set to 0, the default state
203is the normal one.
204.IP "\fBpterm.ApplicationKeypad\fP"
205This option should be set to either 0 or 1; the default is 0. When
206set to 1, the default initial state of the numeric keypad is
207application mode (where the keys send function-key-like sequences
208instead of numbers or arrow keys). When set to 0, the default state
209is the normal one.
210.IP "\fBpterm.NetHackKeypad\fP"
211This option should be set to either 0 or 1; the default is 0. When
212set to 1, the numeric keypad operates in NetHack mode. This is
213equivalent to the \fI\-nethack\fP command-line option.
214.IP "\fBpterm.Answerback\fP"
215This option controls the string which the terminal sends in response
216to receiving the ^E character ("tell me about yourself"). By default
217this string is "PuTTY".
218.IP "\fBpterm.HideMousePtr\fP"
219This option should be set to either 0 or 1; the default is 0. When
220it is set to 1, the mouse pointer will disappear if it is over the
221\fIpterm\fP window and you press a key. It will reappear as soon as
222you move it.
223.IP "\fBpterm.WindowBorder\fP"
224This option controls the number of pixels of space between the text
225in the \fIpterm\fP window and the window frame. The default is 1.
226You can increase this value, but decreasing it to 0 is not
227recommended because it can cause the window manager's size hints to
228work incorrectly.
229.IP "\fBpterm.CurType\fP"
230This option should be set to either 0, 1 or 2; the default is 0.
231When set to 0, the text cursor displayed in the window is a
232rectangular block. When set to 1, the cursor is an underline; when
233set to 2, it is a vertical line.
234.IP "\fBpterm.BlinkCur\fP"
235This option should be set to either 0 or 1; the default is 0. When
236it is set to 1, the text cursor will blink when the window is active.
237.IP "\fBpterm.Beep\fP"
238This option should be set to either 0 or 2 (yes, 2); the default is
2390. When it is set to 2, \fIpterm\fP will respond to a bell character
240(^G) by flashing the window instead of beeping.
241.IP "\fBpterm.BellOverload\fP"
242This option should be set to either 0 or 1; the default is 0. When
243it is set to 1, \fIpterm\fP will watch out for large numbers of
244bells arriving in a short time and will temporarily disable the bell
245until they stop. The idea is that if you \fIcat\fP a binary file,
246the frantic beeping will mostly be silenced by this feature and will
247not drive you crazy.
248
249The bell overload mode is activated by receiving N bells in time T;
250after a further time S without any bells, overload mode will turn
251itself off again.
252
253Bell overload mode is always deactivated by any keypress in the
254terminal. This means it can respond to large unexpected streams of
255data, but does not interfere with ordinary command-line activities
256that generate beeps (such as filename completion).
257.IP "\fBpterm.BellOverloadN\fP"
258This option counts the number of bell characters which will activate
259bell overload if they are received within a length of time T. The
260default is 5.
261.IP "\fBpterm.BellOverloadT\fP"
262This option specifies the time period in which receiving N or more
263bells will activate bell overload mode. It is measured in
264microseconds, so (for example) set it to 1000000 for one second. The
265default is 2000000 (two seconds).
266.IP "\fBpterm.BellOverloadS\fP"
267This option specifies the time period of silence required to turn
268off bell overload mode. It is measured in microseconds, so (for
269example) set it to 1000000 for one second. The default is 5000000
270(five seconds of silence).
271.IP "\fBpterm.ScrollbackLines\fP"
272This option specifies how many lines of scrollback to save above the
273visible terminal screen. The default is 200. This resource is
274equivalent to the \fI\-sl\fP command-line option.
275.IP "\fBpterm.DECOriginMode\fP"
276This option should be set to either 0 or 1; the default is 0. It
277specifies the default state of DEC Origin Mode. (If you don't know
278what that means, you probably don't need to mess with it.)
279.IP "\fBpterm.AutoWrapMode\fP"
280This option should be set to either 0 or 1; the default is 1. It
281specifies the default state of auto wrap mode. When set to 1, very
282long lines will wrap over to the next line on the terminal; when set
283to 0, long lines will be squashed against the right-hand edge of the
284screen.
285.IP "\fBpterm.LFImpliesCR\fP"
286This option should be set to either 0 or 1; the default is 0. When
287set to 1, the terminal will return the cursor to the left side of
288the screen when it receives a line feed character.
289.IP "\fBpterm.WinTitle\fP"
290This resource is the same as the \fI\-T\fP command-line option: it
291controls the initial title of the window. The default is "pterm".
292.IP "\fBpterm.TermWidth\fP"
293This resource is the same as the width part of the \fI\-geometry\fP
294command-line option: it controls the number of columns of text in
295the window. The default is 80.
296.IP "\fBpterm.TermHeight\fP"
297This resource is the same as the width part of the \fI\-geometry\fP
298command-line option: it controls the number of columns of text in
299the window. The defaults is 24.
300.IP "\fBpterm.Font\fP"
301This resource is the same as the \fI\-fn\fP command-line option: it
302controls the font used to display normal text. The default is
303"fixed".
304.IP "\fBpterm.BoldFont\fP"
305This resource is the same as the \fI\-fb\fP command-line option: it
306controls the font used to display bold text when \fIBoldAsColour\fP
307is turned off. The default is unset (the font will be bolded by
308printing it twice at a one-pixel offset).
309.IP "\fBpterm.ShadowBoldOffset\fP"
310This resource can be set to an integer; the default is \-1. It
311specifies the offset at which text is overprinted when using "shadow
312bold" mode. The default (1) means that the text will be printed in
313the normal place, and also one character to the right; this seems to
314work well for most X bitmap fonts, which have a blank line of pixels
315down the right-hand side. For some fonts, you may need to set this to
316\-1, so that the text is overprinted one pixel to the left; for
317really large fonts, you may want to set it higher than 1 (in one
318direction or the other).
319.IP "\fBpterm.BoldAsColour\fP"
320This option should be set to either 0 or 1; the default is 1. It
321specifies the default state of auto wrap mode. When set to 1, bold
322text is shown by displaying it in a brighter colour; when set to 0,
323bold text is shown by displaying it in a heavier font.
324.IP "\fBpterm.Colour0\fP, \fBpterm.Colour1\fP, ..., \fBpterm.Colour21\fP"
325These options control the various colours used to display text in
326the \fIpterm\fP window. Each one should be specified as a triple of
327decimal numbers giving red, green and blue values: so that black is
328"0,0,0", white is "255,255,255", red is "255,0,0" and so on.
329
330Colours 0 and 1 specify the foreground colour and its bold
331equivalent (the \fI\-fg\fP and \fI\-bfg\fP command-line options).
332Colours 2 and 3 specify the background colour and its bold
333equivalent (the \fI\-bg\fP and \fI\-bbg\fP command-line options).
334Colours 4 and 5 specify the text and block colours used for the
335cursor (the \fI\-cfg\fP and \fI\-cbg\fP command-line options). Each
336even number from 6 to 20 inclusive specifies the colour to be used
337for one of the ANSI primary colour specifications (black, red,
338green, yellow, blue, magenta, cyan, white, in that order); the odd
339numbers from 7 to 21 inclusive specify the bold version of each
340colour, in the same order. The defaults are:
341
342.nf
343pterm.Colour0: 187,187,187
344pterm.Colour1: 255,255,255
345pterm.Colour2: 0,0,0
346pterm.Colour3: 85,85,85
347pterm.Colour4: 0,0,0
348pterm.Colour5: 0,255,0
349pterm.Colour6: 0,0,0
350pterm.Colour7: 85,85,85
351pterm.Colour8: 187,0,0
352pterm.Colour9: 255,85,85
353pterm.Colour10: 0,187,0
354pterm.Colour11: 85,255,85
355pterm.Colour12: 187,187,0
356pterm.Colour13: 255,255,85
357pterm.Colour14: 0,0,187
358pterm.Colour15: 85,85,255
359pterm.Colour16: 187,0,187
360pterm.Colour17: 255,85,255
361pterm.Colour18: 0,187,187
362pterm.Colour19: 85,255,255
363pterm.Colour20: 187,187,187
364pterm.Colour21: 255,255,255
365.fi
366.IP "\fBpterm.RectSelect\fP"
367This option should be set to either 0 or 1; the default is 0. When
368set to 0, dragging the mouse over several lines selects to the end
369of each line and from the beginning of the next; when set to 1,
370dragging the mouse over several lines selects a rectangular region.
371In each case, holding down Alt while dragging gives the other
372behaviour.
373.IP "\fBpterm.MouseOverride\fP"
374This option should be set to either 0 or 1; the default is 1. When
375set to 1, if the application requests mouse tracking (so that mouse
376clicks are sent to it instead of doing selection), holding down
377Shift will revert the mouse to normal selection. When set to 0,
378mouse tracking completely disables selection.
379.IP "\fBpterm.Printer\fP"
380This option is unset by default. If you set it, then
381server-controlled printing is enabled: the server can send control
382sequences to request data to be sent to a printer. That data will be
383piped into the command you specify here; so you might want to set it
384to "lpr", for example, or "lpr \-Pmyprinter".
385.IP "\fBpterm.ScrollBar\fP"
386This option should be set to either 0 or 1; the default is 1. When
387set to 0, the scrollbar is hidden (although Shift-PageUp and
388Shift-PageDown still work). This is the same as the \fI\-sb\fP
389command-line option.
390.IP "\fBpterm.ScrollbarOnLeft\fP"
391This option should be set to either 0 or 1; the default is 0. When
392set to 1, the scrollbar will be displayed on the left of the
393terminal instead of on the right.
394.IP "\fBpterm.ScrollOnKey\fP"
395This option should be set to either 0 or 1; the default is 0. When
396set to 1, any keypress causes the position of the scrollback to be
397reset to the very bottom.
398.IP "\fBpterm.ScrollOnDisp\fP"
399This option should be set to either 0 or 1; the default is 1. When
400set to 1, any activity in the display causes the position of the
401scrollback to be reset to the very bottom.
402.IP "\fBpterm.LineCodePage\fP"
403This option specifies the character set to be used for the session.
404This is the same as the \fI\-cs\fP command-line option.
405.IP "\fBpterm.NoRemoteCharset\fP"
406This option disables the terminal's ability to change its character
407set when it receives escape sequences telling it to. You might need
408to do this to interoperate with programs which incorrectly change
409the character set to something they think is sensible.
410.IP "\fBpterm.BCE\fP"
411This option should be set to either 0 or 1; the default is 1. When
412set to 1, the various control sequences that erase parts of the
413terminal display will erase in whatever the current background
414colour is; when set to 0, they will erase in black always.
415.IP "\fBpterm.BlinkText\fP"
416This option should be set to either 0 or 1; the default is 0. When
417set to 1, text specified as blinking by the server will actually
418blink on and off; when set to 0, \fIpterm\fP will use the less
419distracting approach of making the text's background colour bold.
420.IP "\fBpterm.StampUtmp\fP"
421This option should be set to either 0 or 1; the default is 1. When
422set to 1, \fIpterm\fP will log the login in the various system log
423files. This resource is equivalent to the \fI\-ut\fP command-line
424option.
425.IP "\fBpterm.LoginShell\fP"
426This option should be set to either 0 or 1; the default is 1. When
427set to 1, \fIpterm\fP will execute your shell as a login shell. This
428resource is equivalent to the \fI\-ls\fP command-line option.
429.SH BUGS
430Most of the X resources have silly names. (Historical reasons from
431PuTTY, mostly.)
432
433Character-set switching and Unicode are not yet supported.