'\"macro stdmacro
.if n .pH g1.xnews @(#)xnews	40.3 of 1/8/90
.ig
Revised: D. Bodnar 9/7/89
format -dqm4 -man6 -rs1 xnews.1
..
.\" @(#)xnews.1 9.18 89/07/23 Copyright 1989 Sun Micro
.\" @(#)xnews.1 9.9 89/04/20 Copyright 1989 Sun Micro
.nr X
.if \nX=0 .ds x} XNEWS 1 "16 June 1989" "\&"
.if \nX=1 .ds x} XNEWS 1 "16 June 1989"
.if \nX=2 .ds x} XNEWS 1 "" "\&"
.if \nX=3 .ds x} XNEWS "" "" "\&"
.TH \*(x}
.ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
.ds Sd \s-2Ne\h'-0.2n'WS\s+2
.ds Xn \s-2X11/N\s+2e\h'-0.2n'\s-2WS\s+2
.ds Pm \*(Sd Programmer's Guide
.IX xnews#(1) "" "\fLxnews\fP(1)"
.SH NAME
xnews \(em window system server
.SH SYNOPSIS
.B xnews
[
.I \*(Ps-code
]
.IX xnews#(1) ""  "\fLxnews\fP(1) \(em \*(Xn server program"
.SH DESCRIPTION
The \fBxnews\fP command starts the \*(Xn window system server.
The server supports both the X11 protocol and
the \*(Sd protocol.
Clients connect to the server by opening the socket appropriate to
the protocol they use.
The X11 protocol is described in the
\fIX Window System Protocol\fP, Version 11,
from MIT.
The C language binding to the X11 protocol is described in
\fIXlib - C Language X Interface\fP, Version 11,
also from \s-1MIT\s+1.
.LP
The \*(Sd protocol is a superset of the \*(Ps page
description language, described in the
\fI\*(Ps Language Reference Manual\fP by Adobe Systems, Inc.
\*(Sd extensions to the \*(Ps language are described in
The \fI\*(Sd Programmer's Guide\fP, from Sun.
The C client interface is also described there.
.SH OPTIONS
.TP 
[ \fI\*(Ps-code\fP ]
The server interprets the \*(Ps language code given as an argument
on the command line.
If no code is specified on the command line, 
\fBxnews\fP  executes the following:
.sp
	\fB(NeWS/init.ps) (r) file cvx exec &main\fP
.sp
This code fragment sets up the \*(Xn server for its normal use.
When specifying this argument, putting single quotes around the
\fI\*(Ps-code\fP will protect it from premature interpretation
by the shell.
.SH ENVIRONMENT VARIABLES
.LP
The \*(Xn server recognizes the following environment variables:
.TP
.B OPENWINHOME
Should be set to the directory in which the
servers' directory hierarchy is installed.
It is used to initialize the \fIroot menu\fP
to point to the correct copies of the programs it invokes
and to determine which directories are searched for \*(Ps initialization
files, fonts, and other libraries and programs.
.TP
.B XNEWSHOME
Overrides 
.B OPENWINHOME 
for the server
if it is installed in a non-standard place.
Ordinarily it should be unset.
In this case, the server will set it automatically from 
.B OPENWINHOME .
.TP
.B XVIEWHOME
Overrides 
.B OPENWINHOME 
for XView applications
if they are installed in a nonstandard place.
Ordinarily it should be unset.
In this case, the server will set it automatically from 
.B OPENWINHOME .
.TP
.B FONTPATH
A list of directories, separated by semicolons, telling the server
where to look for fonts.
If unset, it defaults to \fB\s-1$OPENWINHOME\s+1/lib/fonts\fR.
.TP
.B LD_LIBRARY_PATH
This variable is used by the shared library linker to determine
which directories to examine for shared libraries.
It should normally be set to 
\fB\s-1$OPENWINHOME\s+1/lib:/usr/lib\fR.
.TP
.B NEWSSERVER
Socket-based connection:
.sp .25
Before starting a \*(Sd application, you can set this environment variable
to tell the application which server to connect to.
If unset, it will try socket 2000.
(For information on how to set this environment variable, 
see the manual page for \fBnewsserverstr\fP.)
.sp .5
Stream-based connection:
.sp .25
Stream-based connections will be provided in the build
notes.
.TP
.B DISPLAY
Before starting an X11 application, you can set this environment variable
to tell the application which server to connect to.
If unset, you must specify the server on the application's commandline
with the \fB-display\fP option.
It is of the following form:
.sp
	\fIhostname\fP:\fIdisplay\fP.\fIscreen\fP
.sp
Here, \fIhostname\fP may be the name of a host, \fBunix\fP, or \fBlocalhost\fP.
The \fIdisplay\fP argument is normally 0.
The \fI.screen\fP argument is optional.
.TP
.B NOSXSEL
If set, the server does not start up \f4sv_xv_sel_svc\f1, which is used
for cut and paste between SunView and XView programs.
.TP
.B X11ONLY
Reduces memory consumption if no \*(Sd clients will be run.
Causes the server to initialize without starting the \*(Ps
window manager, pswm, or loading the \*(Sd toolkit, which pswm
depends on.  Additionally, the \*(Sd connection listener is not
started.  The documentation for the features that \fBX11ONLY\fP turns
off does not necessarily describe the effects of \fBX11ONLY\fP.
.TP
.B NEWSONLY
Reduces memory consumption if no X11 clients will be run.
Causes the server to initialize without constructing data structures
required by the X11 interpreter or making X11 specific \*(Sd operators
available.  It also avoids starting the \*(Ps window manager,
pswm, although it still loads the \*(Sd toolkit, and avoids starting
the X11 connection listener.  Additionally, it omits X11 programs
from the rootmenu.  The documentation for the features that \fBNEWSONLY\fP
turns off does not necessarily describe the effects of \fBNEWSONLY\fP.
.TP
.B NOPSWM
Causes the server to initialize without starting the \*(Ps
window manager, pswm.  Unlike \fBX11ONLY\fP, the objective is not to
save memory consumption but rather to make it easier to run a
different X11 window manager.
.SH "USAGE"
.SS Getting Started
To start the \*(Xn server, check where the server's
directory hierarchy is installed.
The recommended place is \fB/home/openwin\fP.
Assuming it is installed on \fB/home/openwin\fP, set up your environment
in the following way:
.sp
.nf
	\fB\s-1OPENWINHOME\s+1= /home/openwin; export\fP
	\fB\s-1LD_LIBRARY_PATH\s+1 "\s-1$OPENWINHOME\s+1/lib:/usr/lib; export"\fP
.fi
.sp
In your 
.BR .login 
or 
.BR .cshrc
file,
add 
\f3\s-1$OPENWINHOME\s+1/bin\f1
and 
\f3\s-1$OPENWINHOME\s+1/bin/xview\f1
\f1to your 
.B PATH 
ahead of \f3/usr/bin\f1.
If you have been running \*(Sd, you may have already set the
.B FONTPATH 
variable.  If so, unset it as follows:
.sp
	\fBreset \s-1FONTPATH\s+1\f1
.sp
.SH "After Startup"
Immediately after starting the server,
the console is set to be the workstation screen.
This means that messages to the console will disrupt
the entire window system display.
.LP
A console window is available from the root pop-up menu,
in the \fBUtilities\fP pull-right menu.
.SH "Root Menu"
The \f3Root Menu\f1 user interface follows the
\fI\s-1OPEN LOOK\s+1 Graphical User Interface\fP 
specification.
.LP
To pop up the root menu, position the cursor anywhere
in the root background and press the \fBMenu\fP button on the mouse.
By default, the \fBMenu\fP button is the right button.
If you click the button (that is, release it immediately after
pressing it), the menu will stay up.
You can make selections in the menu by clicking the \fBMenu\fP button
over the items in the menu,
or you may dismiss the menu by clicking the \fBMenu\fP button
in the root background.
.LP
Menu items with an arrow on the right denote pull-right menus.
Clicking the \fBMenu\fP button in these will pop up another level of menu.
.LP
You can also use mouse-drag to operate menus.
If you press the \fBMenu\fP button down and hold it down,
the menu will appear.
As you move the mouse through the menu, the highlight will
track the mouse.
If you move the mouse to the right side of a pull-right item,
the next level of menu will appear.
To select a menu item in this mode, simply let go of the \fBMenu\fP button
while the cursor is over your selection.
To dismiss the menu, let go of the \fBMenu\fP button while the
cursor is not over the menu.
.SH "Window Management"
The window management user interface follows the
\fI\s-1OPEN LOOK\s+1 Graphical User Interface\fP specification.
.LP
When you start an application, it may prompt you with a
\fIcrosshair cursor\fP to drag out a rectangle the size of the
new window.
When it appears, its window comes up surrounded
by a \fIwindow frame\fP.
In the corners of the window frame are symbols called
\f2resize corners\f1.
The \fBSelect\fP button, which by default is the left mouse button,
may be used to drag a resize corner to the desired size.
The symbol in the upper left hand corner may be clicked
with the \fBSelect\fP button to close the window, by default.
.LP
Pressing the \f3Menu\f1 button anywhere in the window frame
pops up the \fIwindow menu\fP.
The window menu is operated the same way as the root menu.
.SH "FILES"
If \fBxnews\fP is unable to open a file whose name does not start with /,
and which cannot be found the directory you started from or in your
home directory,
it inserts \fB\s-1$XNEWSHOME\s+1/lib\fP at the front of the name
and tries again.
.TP
\fB\s-1$XNEWSHOME\s+1/etc/\s-1N\s+1e\s-1WS\s+1/*.ps\fP
Startup \*(Ps language code.
.TP
\fB\s-1$XNEWSHOME\s+1/lib/fonts/*\fP
Font library.
.TP
\fB\s-1$XNEWSHOME\s+1/bin/xnews\fP
The server.
.TP
\fB\s-1$XNEWSHOME\s+1/lib/openwin-init\fP
Shell script for initializing window client applications at
server start-up.
.TP
\fB\s-1$XNEWSHOME\s+1/lib/openwin-menu\fP
Template for default root menu.
See \fBbuidmenu\fP.
.TP
\fB~/openwin-init\fP
User override of \fB\s-1$XNEWSHOME\s+1/lib/openwin-init\fP
.TP
\fB~/openwin-menu\fP
User override of \fB\s-1$XNEWSHOME\s+1/lib/openwin-menu\fP
.TP
\fB~/.user.ps\fP
User-definable server customizations, loaded after other system \fB*.ps\fP
files
.TP
\fB~/.startup.ps\fP
User-definable server customizations, loaded before other system \fB*.ps\fP
files.
.SH "SEE ALSO"
\fBpsh\fP(1), \fBpsterm\fP(1), \fBpsview\fP(1), 
\fBjournalling\fP(1),
\fBnewshost\fP(1), 
\fBpsman\fP(1),
\fBhyperview\fP(1), \fBbuildmenu\fP
.LP
.I "\*(Sd Programmer's Guide"
.LP
.I "\*(Ps Language Reference Manual, Adobe Systems Inc., Addison-Wesley"
.LP
.I "X Window System Protocol, Version 11, MIT"
.LP
.I "Xlib - C Language X Interface, Version 11, MIT"
.SH BUGS
.LP
Some parts of the \*(Ps language have yet to be implemented.
See the appendix in the \fI\*(Sd Programmer's Guide\fP entitled
\fIOmissions and Implementation Limits\fP.
.LP
The server is not yet completely robust when it runs out of memory.
This out-of-memory condition occurs because swap space has been
used up.
Swap space is a resource that is shared by all the processes
running on your machine.
.LP
Anyone who can gain access (legitmately or otherwise) to
the system on which the server is running, or to any system
allowed to access the server, has, through either the X11
or the \*(Sd protocol, unrestricted access to the resources of
the server.  They can monitor the keyboard and the mouse,
read information from the screen, and interfere with the
operation of other clients.
.SH TRADEMARK
\*(Ps is a registered trademark of Adobe Systems Inc.


