.\" @(#)nterm.1 1.5 88/01/19 Copyright 1987 Sun Micro .TH NTERM 1 "1 Dec 1987" "NeWS" .SH NAME nterm \- NeWS VT102 terminal emulator .SH SYNOPSIS .B nterm [ option ] ... .SH DESCRIPTION .I Nterm is a terminal emulator for the .I NeWS window system. It attempts to emulate a DEC VT102 terminal. .I Nterm also provides several facilities beyond a basic VT102. These include an arbitrary number of rows and columns, multiple (fixed width) font styles and sizes, selections, vertical and horizontal scrollbars, arbitrary shaped text caret, and selectable colors for the background, text, and caret. .I Nterm maintains a fixed size log of past output. The display window can be moved through this log with the vertical scrollbar. .sp .B Note: .I Nterm is currently in the prototype stage. There are numerous functionality and performance improvements that can be made. It has not yet received extensive testing. .PP .I Nterm understands the following options. If the option begins with a .RB ` + ' instead of a .RB ` \- ', the option is restored to its default value. These options override those set in the NeWS UserProfile dictionary (see the .B "NTERM DEFAULTS" section). .TP 12 .B \-C When .I nterm is run on a Sun, this option causes messages normally destined for the console device, to be displayed in the .I nterm window. .TP .B \-L indicates that .I nterm is being called by .IR init (8), and should presume that its file descriptors are already open on a slave pseudo-tty, and that .IR getty (8) should be run rather than the user's shell. This option should only be used by .IR init (8) .TP .BI \-aw This option turns auto line wrap mode on. A CR LF will be generated whenever a line exceeds the width of the window. .TP .BI \-e " command arguments" The specified .I command will be executed in the window, rather than starting a shell. The command and the optional arguments must appear last on the .I nterm command line. .TP .B \-ls This option causes the shell run under .I nterm to be a login shell (the user's .login file is read and the initial directory will be the home directory). .TP .B \-s When this option is specified, nterm no longer trys to display every line on the screen when scrolling more than a screen-full of text takes place. All output is correctly placed in the history log, however. This option results in significant performance gains when outputing large amounts of text. .TP .BI \-sl " number" The .I number specifies the overall size of the nterm text storage, including both the log and the active display area. The default and minimum size is 150 lines. .SH "NTERM DEFAULTS" .I Nterm allows you to preset defaults by defining keys in the .I NeWS UserProfile dictionary. These keys can be set in the user.ps file, so they are read in automatically whenever the NeWS server is run. See the .I NeWS manual for details on setting up user.ps. Keys recognized by .I nterm are listed below. .TP 15 .B NtermCaretColor A color object that specifies the caret color. .TP .B NtermCaretBlink A real number that specifies the caret blink rate in seconds. O means no blinking. .TP .B NtermCaretDuty A real number between 0 and 1 that specifies the on/off ratio of the caret blink. .TP .B NtermCaretShape A name specifying the caret shape. This name must correspond to a procedure in the global CaretShapeDict dictionary. Nterm adds the following procedures to CaretShapeDict: /HLine, /Triangle, /TrianglePlus (nterm default), and /Diamond. .TP .B NtermTextColor A color object that specifies the text color. .TP .B NtermFillColor A color object that specifies the background color for the entire window. .TP .B NtermFontName A name specifying the font (ie. /Screen). This must be a fixed-width font. .TP .B NtermFontHeight An integer specifying the point size for the font. The minimum point size is 6. .SH EMULATIONS The VT102 emulation is fairly complete, but does not yet support character attributes (ie. reverse, blinking), double-wide and double-size characters, extended chararcter sets, reverse video, 132 column mode, or jump/smooth scrolling. .sp In addition, .I nterm supports the ANSI insert mode escape sequence. .IR Termcap (5) entries that work with .I nterm include ``nterm'', ``nterms'', ``xterm'', ``xterms'', ``vt102'', ``vt100'' and ``ansi''. .I Nterm automatically searches the termcap file in this order for these entries and then sets the ``TERM'' and the ``TERMCAP'' environment variables. .sp A file containing termcap entries for ``nterm'' and ``nterms'' is included in /usr/NeWS/clientsrc/client/nterm/termcap. Users are strongly encouraged to install this termcap. These termcap entries contain support for the ti/te curses functions. This stops programs which cause direct cursor movement (ie. vi) from wiping out the history log. When the program exits its last screen will remain on the active display area, with the history log intact up to the point that the program was invoked. .PP .SH "SELECTIONS" .PP The left and middle mouse buttons are used to specify selections. .I Nterm interfaces to the standard NeWS selection mechanism. .I Nterm can therefore send and receive selections from psterm, SunView, and any other application which interfaces to the standard mechanism. .sp Nterm supports a Macintosh-like dragging selection style for making Primary selections. The left button is used to drag out an initial selection. Push the left button down over the first character to be selection, then move the mouse while holding the button down. Release the button to complete the selection. .sp The middle button extends an existing selection. Push the middle button above or below an existing selection and then move the mouse to extend either the beginning or the end of the selection. .sp SunView-style selections can also be performed by clicking the left mouse button on the selection starting point, then moving to the selection end point and clicking the middle button. .sp The standard Get and Put function keys work in the same manner as SunView. In addition, there are several menu items that allow for selection manipulation; see the .B MENUS section below. .PP .SH "SCROLL BARS" .I Nterm provides horizontal and vertical scrollbars that allow moving the display window over the full text area. The display window can be thought of as a viewport onto this text area which is moved around via the scrollbars. .sp The scroll bars can either jump scroll a fixed amount each time or do continuous scrolling. Clicking any mouse button in the scrollbar will cause jump scrolling. Clicking within the scrollbar arrows will cause small jumps; clicking outside of the arrws will jump in large amounts. Pushing a mouse button over the scrollbar bubble and then moving the mouse while holding the button down causes continuous scrolling. .sp .I Nterm can accomodate arbitrarily wide lines of text. Auto linewrap mode is available. If linewrapping is on, .I nterm will insert a CR LF in those lines that exceed the width of the window. If linewrapping is off, nterm will write the line beyond the edge of the window. The horizontal scrollbar allows long lines to be viewed. .sp The vertical scrollbar allows the viewport to be moved back into the history log area. Selections can be made within the history log. .SH MENUS .I Nterm has five different menus, named .BR Shelf , .BR Points , .BR Fonts , .B Colors and .BR Frame (Sun Logo). There is also an item, .B Stuff, on the .I nterm client menu. .PP The .B Stuff item takes the current primary selection and does a get; i.e. stuffs it into the input. The primary selection is whatever selection is currently highlighted. It can be on the .I nterm you are working on or any other application on the screen. There can be only one primary selection active at one time. .PP The .B Shelf menu lets you get and put selections to and from the NeWS shelf and the SunView shelf. Getting and putting Text to the SunView shelf can take a few seconds for a very long selection. .PP The .B Points menu allows you to change the size of the current font. A wide range of sizes are available. .I Nterm currently uses bit-map fonts (the only things available at the time; nterm will also work with outline fonts). The font that is closest in size to the one requested is used. .PP The .B Fonts menu allows you to change the style of the current font. All of the currently available fixed-width fonts are listed in this menu. The size of the font is the one which is closest to the last selected point size. Note that the Screen-Bold font is available in one size only. .PP The .B Colors menu allows you to change the Fill, Text, and Caret colors. The color selection menu is a visual listing of the contents of the ColorDict dictionary. .PP The .B Frame menu is a copy of the standard frame menu in a convenient place. .SH "OTHER FEATURES" .I Nterm automatically highlights the text cursor when the mouse enters the window and unhighlights it when the mouse leaves the window. If the window is the focus window, then the caret is highlighted no matter where the mouse is. .PP .SH ENVIRONMENT .I Nterm sets the environment variables ``TERM'' and ``TERMCAP'' properly for the size window you have created. .PP .SH CONTROL SEQUENCES .ND .de St .sp .nr PD 0 .nr PI 1.5i .nr VS 16 .. .de Ed .nr PD .3v .nr VS 12 .. .rm CH .nr s 6*\n(PS/10 .ds L \s\nsBEL\s0 .ds E \s\nsESC\s0 .ds T \s\nsTAB\s0 .ds X \s\nsETX\s0 .ds N \s\nsENQ\s0 .ds e \s\nsETB\s0 .ds C \s\nsCAN\s0 .ds S \s\nsSUB\s0 .nr [W \w'\*L'u .nr w \w'\*E'u .if \nw>\n([W .nr [W \nw .nr w \w'\*T'u .if \nw>\n([W .nr [W \nw .nr w \w'\*X'u .if \nw>\n([W .nr [W \nw .nr w \w'\*N'u .if \nw>\n([W .nr [W \nw .nr w \w'\*e'u .if \nw>\n([W .nr [W \nw .nr w \w'\*C'u .if \nw>\n([W .nr [W \nw .nr w \w'\*S'u .if \nw>\n([W .nr [W \nw .nr [W +\w'\|\|'u .de [] .nr w \w'\\$2' .nr H \\n([Wu-\\nwu .nr h \\nHu/2u .ds \\$1 \(br\v'-1p'\(br\v'1p'\h'\\nhu'\\$2\h'\\nHu-\\nhu'\(br\l'-\\n([Wu\(ul'\v'-1p'\(br\l'-\\n([Wu\(rn'\v'1p'\| .. .[] Et \v'-1p'\*X\v'1p' .[] En \v'-1p'\*N\v'1p' .[] Be \v'-1p'\*L\v'1p' .[] Bs \v'-1p'\s\nsBS\s0\v'1p' .[] Ta \v'-1p'\*T\v'1p' .[] Lf \v'-1p'\s\nsLF\s0\v'1p' .[] Vt \v'-1p'\s\nsVT\s0\v'1p' .[] Ff \v'-1p'\s\nsFF\s0\v'1p' .[] Cr \v'-1p'\s\nsCR\s0\v'1p' .[] So \v'-1p'\s\nsSO\s0\v'1p' .[] Si \v'-1p'\s\nsSI\s0\v'1p' .[] Eb \v'-1p'\*e\v'1p' .[] Ca \v'-1p'\*C\v'1p' .[] Su \v'-1p'\*S\v'1p' .[] Es \v'-1p'\*E\v'1p' .[] Fs \v'-1p'\s\nsFS\s0\v'1p' .[] Gs \v'-1p'\s\nsGS\s0\v'1p' .[] Rs \v'-1p'\s\nsRS\s0\v'1p' .[] Us \v'-1p'\s\nsUS\s0\v'1p' .[] # # .[] (( ( .[] ) ) .[] * * .[] + + .[] 0 0 .[] 1 1 .[] 2 2 .[] 3 3 .[] 4 4 .[] 5 5 .[] 6 6 .[] 7 7 .[] 8 8 .[] 9 9 .[] : : .[] ; ; .[] = = .[] > > .[] ? ? .[] @ @ .[] A A .[] cB B .[] C C .[] D D .[] E E .[] F F .[] H H .[] J J .[] K K .[] L L .[] M M .[] N N .[] O O .[] P P .[] R R .[] S S .[] T T .[] [[ [ .[] ] ] .[] ` \` .[] a a .[] b b .[] c c .[] d d .[] f f .[] g g .[] h h .[] i i .[] j j .[] k k .[] l l .[] m m .[] n n .[] p p .[] q q .[] r r .[] s s .[] t t .[] x x .ds Cc \fIC\fP .ds Ps \fIP\v'.3m'\h'-.2m'\s-2s\s0\v'-.3m'\fP .ds Pm \fIP\v'.3m'\h'-.2m'\s-2m\s0\v'-.3m'\fP .ds Pt \fIP\v'.3m'\h'-.2m'\s-2t\s0\v'-.3m'\fP .ds Ix \fIx\fP .ds Iy \fIy\fP .ds Iw \fIw\fP .ds Ih \fIh\fP .ds Ir \fIr\fP .ds Ic \fIc\fP .nr LL 6.5i .am NP .ds CF % .. .SH Definitions .IP \*(Cc A single (required) character. .IP \*(Ps A single (usually optional) numeric parameter, composed of one of more digits. .IP \*(Pm A multiple numeric parameter composed of any number of single numeric parameters, separated by \*; character(s). .IP \*(Pt A text parameter composed of printable characters. .St .IP \\*(Be Bell (Ctrl-G) .IP \\*(Bs Backspace (Ctrl-H) .IP \\*(Ta Horizontal Tab (Ctrl-I) .IP \\*(Lf Line Feed or New Line (Ctrl-J) .IP \\*(Vt Vertical Tab (Ctrl-K) .IP \\*(Ff Form Feed or New Page (Ctrl-L) .IP \\*(Cr Carriage Return (Ctrl-M) .IP \\*(Es\\*#\\*8 DEC Screen Alignment Test (DECALN) .IP \\*(Es\\*(((\\*(Cc .IP \\*(Es\\*7 Save Cursor (DECSC) .IP \\*(Es\\*8 Restore Cursor (DECRC) .IP \\*(Es\\*= Application Keypad (DECPAM) .IP \\*(Es\\*> Normal Keypad (DECPNM) .IP \\*(Es\\*D Index (IND) .IP \\*(Es\\*E Next Line (NEL) .IP \\*(Es\\*H Tab Set (HTS) .IP \\*(Es\\*M Reverse Index (RI) .IP \\*(Es\\*N Insert \*(Ps (Blank) Character(s) (default = 1) (ICH) .IP \\*(Es\\*([[\\*(Ps\|\\*A Cursor Up \*(Ps Times (default = 1) (CUU) .IP \\*(Es\\*([[\\*(Ps\|\\*(cB Cursor Down \*(Ps Times (default = 1) (CUD) .IP \\*(Es\\*([[\\*(Ps\|\\*C Cursor Forward \*(Ps Times (default = 1) (CUF) .IP \\*(Es\\*([[\\*(Ps\|\\*D Cursor Backward \*(Ps Times (default = 1) (CUB) .IP \\*(Es\\*([[\\*(Ps\|\\*;\\*(Ps\|\\*H Cursor Position [row;column] (default = [1,1]) (CUP) .IP \\*(Es\\*([[\\*(Ps\|\\*J Erase in Display (ED) \*(Ps = \*0 \(-> Clear Below (default) \*(Ps = \*1 \(-> Clear Above \*(Ps = \*2 \(-> Clear All .IP \\*(Es\\*([[\\*(Ps\|\\*K Erase in Line (EL) \*(Ps = \*0 \(-> Clear to Right (default) \*(Ps = \*1 \(-> Clear to Left \*(Ps = \*2 \(-> Clear All .IP \\*(Es\\*([[\\*(Ps\|\\*L Insert \*(Ps Line(s) (default = 1) (IL) .IP \\*(Es\\*([[\\*(Ps\|\\*M Delete \*(Ps Line(s) (default = 1) (DL) .IP \\*(Es\\*([[\\*(Ps\|\\*P Delete \*(Ps Character(s) (default = 1) (DCH) .IP \\*(Es\\*([[\\*(Ps\|\\*c Device Atrributes (DA1) .IP \\*(Es\\*([[\\*(Ps\|\\*;\\*(Ps\|\\*f Cursor Position [row;column] (default = [1,1]) (HVP) .IP \\*(Es\\*([[\\*(Ps\|\\*g Tab Clear \*(Ps = \*0 \(-> Clear Current Column (default) \*(Ps = \*3 \(-> Clear All .IP \\*(Es\\*([[\\*(Ps\|\\*h Mode Set (SET) \*(Ps = \*4 \(-> Insert Mode (IRM) \*(Ps = \*2\*0 \(-> Automatic Linefeed (LNM) .IP \\*(Es\\*([[\\*(Ps\|\\*l Mode Reset (RST) \*(Ps = \*4 \(-> Insert Mode (IRM) \*(Ps = \*2\*0 \(-> Automatic Linefeed (LNM) .IP \\*(Es\\*([[\\*(Ps\|\\*n Device Status Report (DSR) \*(Ps = 5 \(-> Status Report \*(Es\*([[\*0\*n \(-> OK \*(Ps = 6 \(-> Report Cursor Position (CPR) [row;column] as \*(Es\*([[\*(Ir\|\*;\*(Ic\|\*R .IP \\*(Es\\*([[\\*(Ps\|\\*;\\*(Ps\|\\*r Set Scrolling Region [top;bottom] (default = full size of window) (DECSTBM) .IP \\*(Es\\*([[\\*(Pm\|\\*t Sun TTY Emulation \*(Pm = \*1\*4 \(-> Send Window Size in Pixels as \*(Es\*([[\*4\*;\*(Iw\|\*;\*(Ih\|\*t \*(Pm = \*1\*8 \(-> Send Window Size in Rows and Columns as \*(Es\*([[\*8\*;\*(Ir\|\*;\*(Ic\|\*t .IP \\*(Es\\*([[\\*(Ps\|\\*x Request Terminal Parameters (DECREQTPARM) .IP \\*(Es\\*([[\\*?\\*E Erase Status Line .IP \\*(Es\\*([[\\*?\\*F Return from Status Line .IP \\*(Es\\*([[\\*?\\*H Hide Status Line .IP \\*(Es\\*([[\\*?\\*S Show Status Line .IP \\*(Es\\*([[\\*?\\*(Ps\|\\*T Go To Column \*(Ps of Status Line .IP \\*(Es\\*([[\\*?\\*(Ps\|\\*h DEC Private Mode Set (DECSET) \*(Ps = \*1 \(-> Application Cursor Keys (DECCKM) \*(Ps = \*6 \(-> Origin Mode (DECOM) \*(Ps = \*7 \(-> Wraparound Mode (DECAWM) \*(Ps = \*4\*7 \(-> Scrolling Only Affects Visible Display .IP \\*(Es\\*([[\\*?\\*(Ps\|\\*l DEC Private Mode Reset (DECRST) \*(Ps = \*1 \(-> Normal Cursor Keys (DECCKM) \*(Ps = \*6 \(-> Normal Cursor Mode (DECOM) \*(Ps = \*7 \(-> No Wraparound Mode (DECAWM) \*(Ps = \*4\*7 \(-> Scrolling Affects History Log .IP \\*(Es\\*([[\\*?\\*(Ps\|\\*r Restore DEC Private Mode \*(Ps = \*1 \(-> Normal/Application Cursor Keys (DECCKM) \*(Ps = \*6 \(-> Normal/Origin Cursor Mode (DECOM) \*(Ps = \*7 \(-> No Wraparound/Wraparound Mode (DECAWM) \*(Ps = \*4\*7 \(-> Use Normal/Alternate Screen Buffer .IP \\*(Es\\*([[\\*?\\*(Ps\|\\*s Save DEC Private Mode \*(Ps = \*1 \(-> Normal/Application Cursor Keys (DECCKM) \*(Ps = \*6 \(-> Normal/Origin Cursor Mode (DECOM) \*(Ps = \*7 \(-> No Wraparound/Wraparound Mode (DECAWM) \*(Ps = \*4\*7 \(-> Use Normal/Alternate Screen Buffer .IP \\*(Es\\*c Full Reset (RIS) .Ed .SH LINEAGE nterm used the X windows (V.10) xterm program as a starting point. .SH "SEE ALSO" NeWS(1), pty(4), tty(4)