.\" @(#)psterm.1 9.2 88/01/19 Copyright 1987 Sun Micro
.TH PSTERM 1  "27 October 1987"
.SH NAME
psterm \(em NeWS terminal emulator
.SH SYNOPSIS
.B psterm
[
options
]
[
command
]
.IX psterm#(1) "" "\fLpsterm\fP(1) \(em NeWS terminal emulator"
.SH DESCRIPTION
.I psterm
is a
.IR termcap -based
terminal emulator program for NeWS.  When invoked,  it reads the
.I /etc/termcap
entry for the terminal named by the
.B -t
option, or by the
.B TERM
environment variable, and arranges to emulate the behavior of that
terminal.  It forks an instance of
.I command
(or, by default,  the program specified by the
.B SHELL
environment variable, or
.I csh 
if this is undefined),
routing keyboard input to the program and displaying its output.
.LP
.I psterm
scales its font to make the number of rows and columns specified in the 
.I /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
.I termcap
defines for that terminal.
.SH OPTIONS
.TP
.B \-C
route
.I /dev/console
messages to this window, if supported by the operating system.
.TP
.B \-f
Bring up a reasonably-sized terminal in the lower-left corner of the screen
(or in the location specified with the
.B \-xy
option) instead of having the user define its size and location.
.TP
.B \-w
wait around after the
.I command
terminates.
.TP
.B \-fl "\fIframe label\fP"
Use the specified string for the frame label.
.TP
.B \-il "\fIicon label\fP"
Use the specified string for the icon label.  The icon label normally defaults
to the name of the host on which
.I psterm
is running.
.TP
.B \-li "\fIlines\fP"
specifies the height of the window in characters.
.TP
.B \-co "\fIcolumns\fP
specifies the width of the window in characters.
.TP
.B \-xy "\fIx y\fP"
specifies the location of the lower left hand corner of the
window (in screen pixel coordinates).
.TP
.B \-bg
causes
.I psterm
to place itself in the background by
disassociating itself from the parent process and the controlling terminal.
If
.I psterm
is invoked with
.IR rsh (1),
this option will cause the
rsh command to complete immediately, rather than hang around until
.I psterm
exits.
.TP
.B \-ls
causes
.I psterm
to invoke the shell as a login shell.  In addition, any
specified
.I command
will be passed to the shell with a
.B \-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
.I psterm
is invoked via
.IR rsh (1),
the host at the other end of the
.I rsh
socket will be used as the server, unless a NEWSSERVER
environment variable is present.
.TP
.B \-pm
specifies that a 
.I psterm
should enable 
.IR "page mode" .
When page mode is enabled and a command produces
more lines of output that can fit on the screen at once,
.I psterm
will stop scrolling, hide the cursor, and wait until the
user types a character before resuming output.  
When 
.I psterm
is blocked with a screenfull 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 screenfull
to appear and be passed through as normal
input.  
This mode can also be enabled or disabled interactively, using the
.I "Page Mode"
menu item.
.SH "SELECTION"
.LP
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.
.LP
Note that selections are made by \fBclicking\fP.
Mouse tracking is not implemented yet.
.LP
The Copy key (L6) copies the 
.I primary
selection to the
.IR shelf .
The Paste key (L8) copies the contents of the
.I shelf
to the
.I "insertion point".
.LP
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
.I secondary
selection to the
.I shelf
and deselects the secondary selection.
.LP
Making a selection while holding down the Paste key
also makes a secondary selection.
It pastes the
.I primary
selection to the location of the 
.\" .I cursor
.\" no matter where the 
secondary selection 
.\" is made,
and deselects the secondary selection.
.LP
Copy and Paste of both primary and secondary selections
work across separate invocations of
.I psterm.
They do not work between
.I psterm
and SunView.
However, a mechanism does exist for transferring a SunView
selection to the \*(Sd shelf, and vice versa. See the description
of 
.I Selection Transfer
in 
.IR news_server (1).
.SH "MENU ITEMS"
.I 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''.
.SH FILES
.ta \w'/etc/termcap  'u
/etc/termcap 	to find the terminal description.
.SH "SEE ALSO"
.IR news_server (1)
.LP
.I "NeWS Manual"
.SH BUGS
.LP
Emulating some terminal types works better than others, largely because
there are incomplete
.I /etc/termcap
entries for them.
.LP
A large number of
.I termcap
fields have yet to be implemented.
.\" XXX .LP
.\" XXX The font size calculations are based on scaling the width of the font.  If
.\" XXX the height of the window is much less than would be expected from the width
.\" XXX of the window,  there are errors in the font size calculations that may
.\" XXX result in screen dirt from characters with descenders.  If this is a
.\" XXX problem, make the window taller.  This problem can be avoided by using the
.\" XXX .B \-f
.\" XXX option.
.LP
.I "Page Mode"
gets easily confused.