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