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