pterm(1)
๐ธ NAME ๐ธ
pterm โ yet another X terminal emulator. This is the pterm(1) page from the PuTTY tool suite, and bestie, itโs giving useful terminal-emulator realness. ๐
โจ SYNOPSIS โจ
pterm [ options ]
๐ DESCRIPTION ๐
pterm is a terminal emulator for X. Itโs based on a port of the terminal emulation engine in the Windows SSH client PuTTY. Iconic lineage, honestly. ๐ฆ
๐ OPTIONS ๐
The command-line options supported by pterm are:
-e command [ arguments ]โ tellsptermto run a command in the new terminal. Everything on the command line after this option gets passed straight to theexecvpsystem call; so if you need the command to redirect its input or output, youโll have to usesh:
pterm -e sh -c 'mycommand < inputfile'
--display display-nameโ specifies the X display on which to openpterm. Note this option has a double minus sign, even though none of the others do. This is because this option is supplied automatically by GTK. Sorry. ๐ญ-name nameโ specifies the name under whichptermlooks up X resources. Normally it will look them up as (for example)pterm.Font. If you specify-name xyz, it will look them up asxyz.Fontinstead. This lets you set up several different sets of defaults and choose between them. โจ-fn font-nameโ specifies the font to use for normal text displayed in the terminal. For example,-fn fixed,-fn "Monospace 12".-fb font-nameโ specifies the font to use for bold text displayed in the terminal. If theBoldAsColourresource is set to1(the default), bold text will be displayed in different colours instead of a different font, so this option will be ignored. IfBoldAsColouris set to0or2and you do not specify a bold font,ptermwill overprint the normal font to make it look bolder.-fw font-nameโ specifies the font to use for double-width characters (typically Chinese, Japanese and Korean text) displayed in the terminal.-fwb font-nameโ specifies the font to use for bold double-width characters (typically Chinese, Japanese and Korean text). Like-fb, this will be ignored unless theBoldAsColourresource is set to0or2.-geometry geometryโ specifies the size of the terminal, in rows and columns of text. SeeX(7)for more information on the syntax of geometry specifications.-sl linesโ specifies the number of lines of scrollback to save off the top of the terminal.-fg colourโ specifies the foreground colour to use for normal text.-bg colourโ specifies the background colour to use for normal text.-bfg colourโ specifies the foreground colour to use for bold text, if theBoldAsColourresource is set to1(the default) or2.-bbg colourโ specifies the foreground colour to use for bold reverse-video text, if theBoldAsColourresource is set to1(the default) or2. (This colour is best thought of as the bold version of the background colour; so it only appears when text is displayed in the background colour.)-cfg colourโ specifies the foreground colour to use for text covered by the cursor.-cbg colourโ specifies the background colour to use for text covered by the cursor. In other words, this is the main colour of the cursor.-title titleโ specifies the initial title of the terminal window. (This can be changed under control of the server.)-ut-or+utโ tellsptermnot to record your login in theutmp,wtmpandlastlogsystem log files; so you will not show up onfingerorwholistings, for example.-utโ tellsptermto record your login inutmp,wtmpandlastlog: this is the opposite of-ut-. This is the default option: you will probably only need to specify it explicitly if you have changed the default using theStampUtmpresource.-ls-or+lsโ tellsptermnot to execute your shell as a login shell.-lsโ tellsptermto execute your shell as a login shell: this is the opposite of-ls-. This is the default option: you will probably only need to specify it explicitly if you have changed the default using theLoginShellresource.-sb-or+sbโ tellsptermnot to display a scroll bar.-sbโ tellsptermto display a scroll bar: this is the opposite of-sb-. This is the default option: you will probably only need to specify it explicitly if you have changed the default using theScrollBarresource.-log logfile,-sessionlog logfileโ this option makesptermlog all the terminal output to a file as well as displaying it in the terminal.-cs charsetโ this option specifies the character set in whichptermshould assume the session is operating. This character set will be used to interpret all the data received from the session, and all input you type or paste intoptermwill be converted into this character set before being sent to the session.
Any character set name which is valid in a MIME header (and supported by pterm) should be valid here (examples are ISO-8859-1, windows-1252 or UTF-8). Also, any character encoding which is valid in an X logical font description should be valid (ibm-cp437, for example).
ptermโs default behaviour is to use the same character encoding as its primary font. If you supply a Unicode (iso10646-1) font, it will default to the UTF-8 character set.
Character set names are case-insensitive. ๐
-nethackโ tellsptermto enable NetHack keypad mode, in which the numeric keypad generates the NetHackhjklyubndirection keys. This enables you to play NetHack with the numeric keypad without having to use the NetHacknumber_padoption (which requires you to pressnbefore any repeat count). So you can move with the numeric keypad, and enter repeat counts with the normal number keys. Slay. ๐ฎ-xrm resource-stringโ this option specifies an X resource string. Useful for setting resources which do not have their own command-line options. For example:
pterm -xrm 'ScrollbarOnLeft: 1'
-help,--helpโ display a message summarizing the available options.-pgpfpโ display the fingerprints of the PuTTY PGP Master Keys, to aid in verifying new files released by the PuTTY team. ๐
๐ X RESOURCES ๐
pterm can be more completely configured by means of X resources. All of these resources are of the form pterm.FOO for some FOO; you can make pterm look them up under another name, such as xyz.FOO, by specifying the command-line option -name xyz.
pterm.CloseOnExitโ this option should be set to0,1or2; the default is2. It controls whatptermdoes when the process running inside it terminates. When set to2(the default),ptermwill close its window as soon as the process inside it terminates. When set to0,ptermwill print the processโs exit status, and the window will remain present until a key is pressed (allowing you to inspect the scrollback, and copy and paste text out of it).
When this setting is set to 1, pterm will close immediately if the process exits cleanly (with an exit status of zero), but the window will stay around if the process exits with a non-zero code or on a signal. This enables you to see what went wrong if the process suffers an error, but not to have to bother closing the window in normal circumstances. ๐ซถ
pterm.WarnOnCloseโ this option should be set to either0or1; the default is1. When set to1,ptermwill ask for confirmation before closing its window when you press the close button.pterm.TerminalTypeโ this controls the value set in theTERMenvironment variable inside the new terminal. The default isxterm.pterm.BackspaceIsDeleteโ this option should be set to either0or1; the default is1. When set to0, the ordinary Backspace key generates the Backspace character (^H); when set to1, it generates the Delete character (^?). Whichever one you set, the terminal device insideptermwill be set up to expect it.pterm.RXVTHomeEndโ this option should be set to either0or1; the default is0. When it is set to1, the Home and End keys generate the control sequences they would generate in the rxvt terminal emulator, instead of the more usual ones generated by other emulators.pterm.LinuxFunctionKeysโ this option can be set to any number between0and5inclusive; the default is0. The modes vary the control sequences sent by the function keys; for more complete documentation, it is probably simplest to try each option inpterm -e cat, and press the keys to see what they generate. ๐pterm.NoApplicationKeysโ this option should be set to either0or1; the default is0. When set to1, it stops the server from ever switching the numeric keypad into application mode (where the keys send function-key-like sequences instead of numbers or arrow keys). You probably only need this if some application is making a nuisance of itself.pterm.NoApplicationCursorsโ this option should be set to either0or1; the default is0. When set to1, it stops the server from ever switching the cursor keys into application mode (where the keys send slightly different sequences). You probably only need this if some application is making a nuisance of itself.pterm.NoMouseReportingโ this option should be set to either0or1; the default is0. When set to1, it stops the server from ever enabling mouse reporting mode (where mouse clicks are sent to the application instead of controlling cut and paste).pterm.NoRemoteResizeโ this option should be set to either0or1; the default is0. When set to1, it stops the server from being able to remotely control the size of theptermwindow.pterm.NoAltScreenโ this option should be set to either0or1; the default is0. When set to1, it stops the server from using thealternate screenterminal feature, which lets full-screen applications leave the screen exactly the way they found it. โจ
pterm.NoRemoteWinTitle
straightforward 0-or-1 situation, bestie โ default is 0. flip it to 1 and the server can no longer remotely control the title of your pterm window. that's the whole thing ๐
pterm.NoRemoteQTitle
0 or 1 again, but heads up: the default here is 1. set to 1, it stops the server from remotely requesting the title of the pterm window.
โ ๏ธ POTENTIAL SECURITY HAZARD โ the page is literally yelling in caps and honestly? deserved. if a malicious application can write data to your terminal (like, you merelycata file owned by someone else on the server machine ๐), it can change your window title โ unless you've disabled that using theNoRemoteWinTitleresource โ and then use this service to have the new window title sent back to the server as if it was typed at the keyboard. that lets an attacker fake keypresses and potentially make your server-side applications do things you did not want. so this feature is disabled by default, and the page recommends you do not turn it on unless you really know what you're doing. fr fr, leave it alone. ๐ซถ
pterm.NoDBackspace
0 or 1, default 0. set it to 1 and it disables the normal action of the Delete (^?) character when it's sent from the server to the terminal โ which would normally move the cursor left by one space and erase the character now under it. gone. poof. ๐ฆ
pterm.ApplicationCursorKeys
0 or 1, default 0. set it to 1 and the default initial state of the cursor keys is application mode (meaning those keys send function-key-like sequences instead of numbers or arrow keys). set it to 0 and the default state is the normal one. simple as โจ
pterm.ApplicationKeypad
0 or 1, default 0. same energy, but for the numeric keypad: 1 means the default initial state is application mode (keys send function-key-like sequences instead of numbers or arrow keys), 0 means the normal one.
pterm.NetHackKeypad
0 or 1, default 0. set it to 1 and the numeric keypad operates in NetHack mode. it's equivalent to the -nethack command-line option ๐ฎ
pterm.Answerback
this one controls the string the terminal sends in response to receiving the ^E character (the "tell me about yourself" one). by default that string is PuTTY. iconic, no notes ๐
pterm.HideMousePtr
0 or 1, default 0. set it to 1 and the mouse pointer disappears if it's over the pterm window and you press a key โ then it reappears as soon as you move it. peekaboo ๐ญ
pterm.WindowBorder
controls the number of pixels of space between the text in the pterm window and the window frame. default is 1. you can increase it, but decreasing it to 0 is not recommended because it can cause the window manager's size hints to work incorrectly. sobs.
pterm.CurType
0, 1 or 2 โ default is 0. pick your cursor fighter:
0โ rectangular block1โ underline2โ vertical line
pterm.BlinkCur
0 or 1, default 0. set it to 1 and the text cursor blinks when the window is active ๐
pterm.Beep
0 or 2 โ yes, 2, the page is being so serious about that โ and the default is 0. set it to 2 and pterm responds to a bell character (^G) by flashing the window instead of beeping. no beeps, just vibes โจ
pterm.BellOverload
0 or 1, default 0. set it to 1 and pterm watches out for large numbers of bells arriving in a short time and temporarily disables the bell until they stop. the idea? if you cat a binary file, the frantic beeping mostly gets silenced by this feature instead of driving you crazy ๐ญ
the bell overload mode is activated by receiving N bells in time T; after a further time S without any bells, overload mode turns itself off again.
bell overload mode is always deactivated by any keypress in the terminal โ which means it can respond to large unexpected streams of data without interfering with ordinary command-line activities that generate beeps (filename completion, looking at you ๐).
pterm.BellOverloadN
counts the number of bell characters which will activate bell overload if they're received within a length of time T. default is 5.
pterm.BellOverloadT
the time period in which receiving N or more bells will activate bell overload mode. measured in microseconds, so for example set it to 1000000 for one second. default is 2000000 (two seconds).
pterm.BellOverloadS
the time period of silence required to turn bell overload mode back off. also measured in microseconds, so like 1000000 for one second. default is 5000000 (five seconds of silence) ๐คซ
pterm.ScrollbackLines
how many lines of scrollback get saved above the visible terminal screen. default is 200. equivalent to the -sl command-line option.
pterm.DECOriginMode
0 or 1, default 0. specifies the default state of DEC Origin Mode. and in the page's own words: if you don't know what that means, you probably don't need to mess with it. honestly? respect ๐ญ
pterm.AutoWrapMode
0 or 1, default 1. specifies the default state of auto wrap mode. set to 1, very long lines wrap over onto the next line on the terminal; set to 0, long lines get squashed against the right-hand edge of the screen. brutal but valid.
pterm.LFImpliesCR
0 or 1, default 0. set it to 1 and the terminal returns the cursor to the left side of the screen whenever it receives a line feed character โจ
pterm.WinTitle
same as the -T command-line option โ it controls the initial title of the window. default is pterm ๐
pterm.TermWidth
same as the width part of the -geometry command-line option โ it controls the number of columns of text in the window. default is 80.
pterm.TermHeight
the page says this is the same as the width part of the -geometry command-line option and that it controls the number of columns of text in the window โ yes, that's literally what it says, I'm just the messenger ๐ โ and the default is 24.
pterm.Font
same as the -fn command-line option โ it controls the font used to display normal text. default is fixed.
pterm.BoldFont
same as the -fb command-line option โ it controls the font used to display bold text when BoldAsColour is set to 0 or 2. default is unset (the font will be bolded by printing it twice at a one-pixel offset). cute little hack tbh ๐
pterm.WideFont
same as the -fw command-line option โ it controls the font used to display double-width characters. default is unset (double-width characters cannot be displayed). ๐
pterm.WideBoldFont
same as the -fwb command-line option โ it controls the font used to display double-width characters in bold, when BoldAsColour is set to 0 or 2. default is unset (double-width characters are displayed in bold by printing them twice at a one-pixel offset).
pterm.ShadowBoldOffset
settable to an integer; the page opens with "the default is -1" and then a couple lines later hits you with "the default (1)". yeah. both. iykyk ๐ญ it specifies the offset at which text is overprinted when using shadow bold mode. the default (1) means the text gets printed in the normal place, and also one character to the right โ which seems to work well for most X bitmap fonts, since they've got a blank line of pixels down the right-hand side. for some fonts you may need to set this to -1 so the text is overprinted one pixel to the left; and for really large fonts you might want to set it higher than 1 (in one direction or the other) ๐
pterm.BoldAsColour
0, 1 or 2 โ default 1. how bold text should be displayed, your choice:
1โ bold text is shown in a brighter colour0โ bold text is shown in a heavier font2โ both effects happen at once (a heavy font and a brighter colour)
slay ๐
pterm.Colour0, pterm.Colour1, ..., pterm.Colour21
these options control the various colours used to display text in the pterm window. each one gets specified as a triple of decimal numbers giving red, green and blue values โ so black is 0,0,0, white is 255,255,255, red is 255,0,0 and so on ๐
the mapping, bestie:
- colours
0and1specify the foreground colour and its bold equivalent (the-fgand-bfgcommand-line options) - colours
2and3specify the background colour and its bold equivalent (the-bgand-bbgcommand-line options) - colours
4and5specify the text and block colours used for the cursor (the-cfgand-cbgcommand-line options) - each even number from
6to20inclusive specifies the colour used for one of the ANSI primary colour specifications โ black, red, green, yellow, blue, magenta, cyan, white, in that order - the odd numbers from
7to21inclusive specify the bold version of each colour, in the same order
the defaults are: โจ
pterm.Colour0: 187,187,187
pterm.Colour1: 255,255,255
pterm.Colour2: 0,0,0
pterm.Colour3: 85,85,85
pterm.Colour4: 0,0,0
pterm.Colour5: 0,255,0
pterm.Colour6: 0,0,0
pterm.Colour7: 85,85,85
pterm.Colour8: 187,0,0
pterm.Colour9: 255,85,85
pterm.Colour10: 0,187,0
pterm.Colour11: 85,255,85
pterm.Colour12: 187,187,0
pterm.Colour13: 255,255,85
pterm.Colour14: 0,0,187
pterm.Colour15: 85,85,255
pterm.Colour16: 187,0,187
pterm.Colour17: 255,85,255
pterm.Colour18: 0,187,187
pterm.Colour19: 85,255,255
pterm.Colour20: 187,187,187
pterm.Colour21: 255,255,255
pterm.RectSelectโ bestie, this one is literally just0or1, and the default is0. Set it to0and dragging your mouse down over several lines selects all the way to the end of each line and from the beginning of the next one (the normal, "flowing text" vibe). Set it to1and that same drag selects a rectangular region instead ๐. Either way, if you hold down Alt while you drag, you get the other behaviour. Sneaky little flip-flop, we stan.pterm.MouseOverrideโ also0or1, defaulting to1. When it's1, and the application you're in asks for mouse tracking (meaning your clicks get yeeted to the app instead of doing selection), holding down Shift reverts the mouse to normal selection โ a little escape hatch, love that for us ๐ซถ. When it's0, mouse tracking totally disables selection, no take-backs. Periodt.pterm.Printerโ unset by default, so nothing happens unless you set it. Once you do, server-controlled printing is on: the server can send control sequences asking for data to be sent to a printer, and that data gets piped straight into the command you put here. So like, you might set it tolpr, for example, orlpr -Pmyprinter๐ . It's literally a pipe to whatever you want.pterm.ScrollBarโ0or1, default1. Set it to0and the scrollbar is hidden (although Shift-PageUp and Shift-PageDown still work, so you're not stranded). This is the same as the-sbcommand-line option. Twin flames fr fr.pterm.ScrollbarOnLeftโ0or1, default0. Set it to1and the scrollbar shows up on the left of the terminal instead of the right. Left-handed girlies rise ๐pterm.ScrollOnKeyโ0or1, default0. Set it to1and literally any keypress snaps the scrollback position right back down to the very bottom. Very "no thoughts, back to the present" energy.pterm.ScrollOnDispโ0or1, default1. Set it to1and any activity in the display resets the scrollback position to the very bottom. Basically if something new happens, you're catching up on it immediately ๐ฅpterm.LineCodePageโ tells pterm which character set to use for the session. Same as the-cscommand-line option. Iconic.pterm.NoRemoteCharsetโ this one disables the terminal's ability to change its own character set when it gets escape sequences telling it to. Why would you want that? Because you might need it to interoperate with programs that incorrectly change the character set to something they think is sensible. Rude of them ngl, but here's your shield ๐pterm.BCEโ0or1, default1. Set it to1and the various control sequences that erase parts of the terminal display will erase in whatever the current background colour is. Set it to0and they'll erase in black, always, no matter what. Choose your fighter โจpterm.BlinkTextโ0or1, default0. Set it to1and text that the server says should be blinking will actually blink on and off ๐ญ. Leave it at0and pterm takes the less distracting route: making the text's background colour bold instead. Honestly the glow-up we deserve.pterm.StampUtmpโ0or1, default1. Set to1, pterm logs the login in the various system log files. This resource is equivalent to the-utcommand-line option. Receipts, kept ๐pterm.LoginShellโ0or1, default1. Set to1and pterm executes your shell as a login shell. This resource is equivalent to the-lscommand-line option. Main character shell behaviour, honestly ๐
๐ BUGS ๐
Soโฆ most of the X resources have silly names. Not me saying it, the page says it. Historical reasons from PuTTY, mostly. We don't ask questions about the ancestors ๐ง
And that's the whole page bestie!! ๐ This little masterpiece came from the PuTTY tool suite, dated 2004โ03โ24. A vintage icon, truly. Go forth and configure your terminal with taste ๐โจ
๐ฆ where this page comes from
- arch rolling: putty 0.85-1 ยท MIT
- debian bookworm: pterm 0.78-2+deb12u1 ยท MIT
- debian bookworm: pterm 0.78-2+deb12u2 ยท MIT
- debian trixie: pterm 0.83-3 ยท MIT
- epel 9: putty 0.84-1.el9 ยท MIT
- fedora 43: putty 0.83-2.fc43 ยท MIT
- fedora 43: putty 0.84-1.fc43 ยท MIT
- fedora 44: putty 0.83-4.fc44 ยท MIT
- fedora 44: putty 0.84-1.fc44 ยท MIT
- ubuntu noble: pterm 0.81-1 ยท MIT
- ubuntu questing: pterm 0.83-3
- ubuntu resolute: pterm 0.83-3build1 ยท MIT
- ubuntu stonking: pterm 0.84-1 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms