PSTERM(1) — USER COMMANDS
NAME
psterm — NeWS terminal emulator
SYNOPSIS
psterm [ options ] [ command ]
DESCRIPTION
psterm is a termcap-based terminal emulator program for NeWS. When invoked, it reads the /etc/termcap entry for the terminal named by the -t option, or by the TERM environment variable, and arranges to emulate the behavior of that terminal. It forks an instance of command (or, by default, the program specified by the SHELL environment variable, or csh if this is undefined), routing keyboard input to the program and displaying its output.
psterm scales its font to make the number of rows and columns specified in the /etc/termcap entry for the terminal it is emulating fit the size of its window. It also responds to most of the particular escape sequences that termcap defines for that terminal.
OPTIONS
−C Route /dev/console messages to this window, if supported by the operating system.
−f Bring up a reasonably-sized terminal in the lower-left corner of the screen (or in the location specified with the −xy option) instead of having the user define its size and location.
−w Wait around after the command terminates.
−fl framelabel
Use the specified string for the frame label.
−il iconlabel
Use the specified string for the icon label. The icon label normally defaults to the name of the host on which psterm is running.
−li lines
Specifies the height of the window in characters.
−co columns
Specifies the width of the window in characters.
−xy x y
Specifies the location of the lower left hand corner of the window (in screen pixel coordinates).
−bg Causes psterm to place itself in the background by disassociating itself from the parent process and the controlling terminal. If psterm is invoked with rsh(1), this option will cause the rsh command to complete immediately, rather than hang around until psterm exits.
−ls causes psterm to invoke the shell as a login shell. In addition, any specified command will be passed to the shell with a −c option, rather than being invoked directly, so that the shell can establish any environment variables that may be needed by the command. Further, if psterm is invoked via rsh(1), the host at the other end of the rsh socket will be used as the server, unless a NEWSSERVER environment variable is present.
−pm Specifies that a psterm should enable page mode. When page mode is enabled and a command produces more lines of output that can fit on the screen at once, psterm will stop scrolling, hide the cursor, and wait until the user types a character before resuming output. When psterm is blocked with a screenful of data, typing a carriage return or space will cause scrolling to proceed by one line or one screenful, respectively; any other character will cause the next screenful to appear and be passed through as normal input. This mode can also be enabled or disabled interactively, using the Page Mode menu item.
−t Specifies the terminal type, which can be identified by the name of its termcap entry. For example:
example% psterm -t sun
example% psterm -t vt100
−fontsize size
Specifies the point size of the font to be used when psterm is being brought up in fixed size mode (see the -f option). The default size is 12 points.
SELECTION
Clicking the left mouse button over a character selects that character. Clicking it beyond the end of the line selects the newline at the end of that line. Clicking the middle mouse button over a character when a primary selection does not exist in that window selects that character. Clicking the middle mouse button over a character when a primary selection does exist in that window extends or shrinks the selection to that character. Pressing the left button and dragging the pointer over the text selects the text between the original press location and the current mouse location. Pressing the left button over previously select text and then dragging invokes the OPEN LOOK-style drag and drop selection mechanism.
The Copy key (L6) copies the primary selection to the shelf. The Paste key (L8) copies the contents of the shelf to the insertion point .
If you make a selection while holding down the Copy key, the selection will be a secondary selection. Subsequently letting go of the Copy key copies the secondary selection to the insertion point in the window that had the keyboard focus when the selection was begun.
Making a selection while holding down the Paste key also makes a secondary selection. It pastes the primary selection to the location of the secondary selection and deselects the secondary selection.
Copy and Paste of both primary and secondary selections work across separate invocations of psterm.
MENU ITEMS
psterm adds two items to the top of the standard menu associated with the right hand mouse button. These items permit the page mode and automatic margin modes to be turned on and off. Menu items change according to the state of each mode. For example, if page mode is enabled, the menu item will indicate Page Mode Off. The Automatic Margin entry controls the automatic wrapping of text characters when the text cursor hits the right terminal margin. When it is on, the text cursor and characters are automatically wrapped to the next line. When it is off, the text cursor remains at the terminal’s right margin and characters overstrike one another in the last column.
FONTS
The psterm commands uses a NeWS class variable to decide which font to use. To select a font other than the default (which is Courier), place the following code in your .startup.ps file:
UserProfile begin
/ClassPsTermCanvas {
begin
/TextFamily myfont store
currentdict end
} def
end
Here, myfont can be /Courier, /fixed, or /LucidaSansTypewriter. Any font that the server can access can be used; however, only fixed-width fonts work correctly.
The size of the font used is based on the size of the window. If the -f fixed option is used, psterm starts out at an appropriate size to use a 12 point version of the specified font family, unless the -fontsize option is used to specify a different point size. Even if psterm is started in fixed size mode, resizing it causes it to select a new font size to fit the new-sized window with the original number of rows and columns.
FILES
/etc/termcap to find the terminal description.
SEE ALSO
NeWS Programmer’s Guide
BUGS
Emulating some terminal types works better than others, largely because there are incomplete /etc/termcap entries for them.
A large number of termcap fields have yet to be implemented.
Page Mode gets easily confused.
Resizing psterm to a size smaller than the fixed startup size for bitmap fonts such as fixed causes display-garbage, since X11/NeWS cannot scale these fonts.
Sun Release 4.0 — Last change: 15 June 1987