.\" @(#)news_server.1 9.6 88/01/19 Copyright 1987 Sun Micro .TH NEWS_SERVER 1 "2 December 1987" .SH NAME news_server \(em NeWS server .SH SYNOPSIS .B news_server .\" XXX .RB [ " \-v " ] [ \*(Px ] .IX news_server#(1) "" "\fLnews_server\fP(1) \(em NeWS server program" .SH DESCRIPTION The .I news_server command starts the \*(Sd server. The \*(Sd server is an interpreter for a subset of the \*(Ps. The \*(Ps was defined by Adobe Systems Inc. \*(Sd supports many overlapping drawing surfaces, multiple lightweight threads of execution, and message-based interprocess communication. Details of the the structure of \*(Sd are found in the .IR "NeWS Manual" . .# .SH OPTIONS .\" XXX .TP .\" XXX .B \-v .\" XXX Turn on verbose output from server during startup. .TP [\ \*(Px\ ] The \*(Sd server interprets the \*(Px program given as an argument on the command line. If no \*(Ps text is given on the command line, \fInews_server\fP executes .sp \fB(NeWS/init.ps) (r) file cvx exec &main\fP .sp This \*(Ps fragment sets up \*(Sd for its normal use as a window server. When specifying this argument, you probably should put single quotes around the \(lq\*Ps fragment \(rq to protect it from premature interpretation by the shell. The \*(Ps files \fB%stdin\fP, \fB%stdout\fP, and \fB%stderr\fP have their normal meanings while this program is executing. .TP \fBFRAMEBUFFER\fP Another option is defined by the \fBFRAMEBUFFER\fP environment variable. The device name (e.g., \fI/dev/bwtwo0, /dev/cgtwo0\fP) contained in \fBFRAMEBUFFER\fP tells \*(Sd which frame buffer to display on. If \fBFRAMEBUFFER\fP is not defined then \fI/dev/fb\fP is the default. .SH "USAGE" The first thing that you should do is to start a terminal emulator which acts as a console. This console window will display system messages and will prevent these messages from writing over your display. Bring up a console window by depressing the right mouse button and sliding the mouse to the right until the word `Console' is displayed under the mouse cursor. Now release the right mouse. .SS Compatibility \*(Sd may be run either from outside the SunView environment, or from inside the SunView environment by using .IR overview (1). \fBNB\fP: You must be sure that the \fBFRAMEBUFFER\fP environment variable used by the \*(Sd server matches the \fB-d\fP argument used by server matches the \fB-d\fP argument used by \fLsuntools\fP. Both of these values default to \fL/dev/fb\fP, so if one is changed, the other must be also: .IX overview#(1) "" \fLoverview\fP(1) .sp \fBoverview -w news_server\fP .sp While running \*(Sd from outside SunView, SunView tool binaries may be executed as normal. Their windows will appear on top of all \*(Sd windows, but will otherwise behave normally. .SS "Root Menu" .IX "menu" "root menu" When \*(Sd starts, using the standard .IR init.ps , it paints the desktop gray and waits for the user to select a menu option. By default, menus pop up on the right mouse button. The standard root menu is (shown with the submenus hierarchy expanded): .sp .nf Applications => Terminals => Fixed Size => Console sun H19 bitgraph vt100 wyse tvi925 Console sun H19 bitgraph vt100 wyse tvi925 Clocks => Plain Plain (seconds) Fancy Fancy (seconds) Load Average Calculator Journal Demos => (see newsdemo(6)) All Windows => Zap Open Close Flip Tidy Here Drop Top Bounce => Windows Icons All Stop SunView1 => Selection Transfer => NeWS to SunView Shelf SunView to NeWS Shelf Applications => shelltool cmdtool mailtool textedit defaultsedit iconedit dbxtool perfmeter clock gfxtool console lockscreen Default .suntools User Interface => Input Focus => Click to Type Follow Cursor Window Management Style => Rubber-band Box => Thin Thick Grid Zoom => Zoom Slow Zoom Medium Zoom Fast Flip Drag Look & Feel => NeWS Default SunView1 Retained Windows => On Off Default Root Image => Group Plain Repair => Repaint All Reset Input Exit NeWS => No, not really. Yes, really! .fi .sp .TP Applications => This menu lets you start up a number of \*(Sd applications. \fITerminals\fP is a pull-right menu from which you can create a window using the .IR psterm (1) .IX psterm#(1) "" \fLpsterm\fP(1) terminal emulator program. If you select one of these terminals, you must drag out the exact size of the window in which the terminal emulator will run. There is another menu item called \fIFixed Startup\fP, which has the same options as the \fITerminals\fP menu. If you select one of the terminals from \fIFixed Startup\fP, you need not specify the size and location of the terminal emulator; it will be created automatically in the lower-left corner of the screen. Selecting \fIConsole\fR from either the \fITerminals\fP menu or the \fIFixed Startup\fP menu creates an H19 terminal emulator that is set up to receive console messages. \fIClocks\fP is a pull-right menu from which you can create a clock. The \fIPlain\fP clock is a simple round clock. The \fIFancy\fP clock is a stylish modern round clock. Both clocks can be create with an option to show the seconds. \fILoad Average\fP invokes the \fIpsload\fP program. This program is a load average monitor. \fIJournal\fP causes a journalling mechanism to be loaded into \*(Sd. In addition, a menu entitled ``Journalling'' is installed in the top level root menu. The journalling mechanism allows you to capture and playback user actions. See \fIjournalling(1)\fP. .TP Demos => Lets you run one of the many demonstration programs. They are described in .IR newsdemos (6). .TP All Windows => Provides you with the choices necessary to manage all the windows on your display at once. Some of the operations are more fun than useful. \fIZap\fP causes all the windows on the screen to be destroyed. \fIOpen\fP causes all the windows on the screen to be opened. \fIClose\fP causes all the windows on the screen to be closed. \fIFlip\fP causes all the windows on the screen to toggle between their open state and their closed state. \fITidy\fP causes all the open windows on the screen to be moved to their closest corner. All closed windows line up along the bottom edge of the screen. \fIClose\fP causes all the windows on the screen to be closed. \fIHere\fP Allows you to position all the windows on the screen with successive clicks of the mouse. \fIDrop\fP causes all the windows on the screen to ``fall'' to the bottom of the screen. \fITop\fP causes all the windows on the screen to ``rise'' to the top of the screen. \fIBounce\fP is a pull-right menu that is used to invoke a demo that is used to ``bounce'' windows around the screen. This demo is particularly slick when all the windows are retained. You can bounce just the open windows with the \fIWindows\fP command. You can bounce just the icons with the \fIIcons\fP command. You can bounce both with the \fIAll\fP command. \fIStop\fP terminates the bouncing. .TP SunView1 => As mentioned above, you can run existing SunView1 and SunWindows application concurrently with \*(Sd applications. \fISelection Transfer\fP lets you exchange selections between \*(Sd applications and SunView applications. \fINeWS to SunView Shelf\fP takes the current \*(Sd selection and loads it onto the SunView shelf. A subsequent \fIget\fP operation in SunView will retreive the contents of the shelf. \fISunView to NeWS Shelf\fP takes the current SunView selection and loads it onto the \*(Sd shelf. A subsequent \fIget\fP operation in \*(Sd will retreive the contents of the shelf. \fBNote\fP: There is a race condition between when you invoke one of these shelf transfer menu operations and when you subsequently release the \fIget\fP key. Waiting a second or two between the two operations should avoid any problem. \fIApplications\fP lets you invoke any of the following SunView applications: \fIshelltool, cmdtool, textedit, mailtool, defaultsedit, iconedit, dbxtool, perfmeter, clock, gfxtool, console, lockscreen\fP. The \fIDefault .suntools\fP entry starts up the standard set of SunView applications, which includes a console window, a text editor, a clock, a mail handler, and a terminal emulator. .TP User Interface => The \fIUser Interface\fP menu lets you alter a number of user interface options. \fIInput Focus\fP is a pull-right that provides you with a choice of keyboard focus mechanisms. \fIClick to Type\fP forces input to occur in whichever window you last clicked the mouse (independent of current cursor location). \fIFollow Cursor\fP forces the input focus to shift to whichever window the cursor is currently in. \fIWindow Management Style\fP pull-right provides you with a number of options for controlling the default behavior of your windows. The \fIRubber-band Box\fP menu controls the appearance of the rubber-band rectangle that appears when you specify window size; the choices are \fIThin\fP, \fIThick\fP and \fIGrid\fP. The \fIZoom\fP menu controls the speed with which windows zoom into icons and vice versa; the choices are \fIZoom Slow\fP, \fIZoom Medium\fP and \fIZoom Fast\fP. \fIFlip Drag\fP toggles the method of moving windows between dragging the entire window and dragging just its frame. \fILook & Feel\fP is a pull-right that allows you to toggle between the standard \*(Sd look and feel and the SunView1 look and feel. Both windows and menus are altered to reflect the chosen look and feel. \fIRetained Windows\fP is a pull-right that allows you to choose the image saving behavior of newly created windows. If you turn retention \fIOn\fP, windows redisplay very quickly, at the expense of more main memory usage. If you turn retention \fIOff\fP, applications redisplay by repainting their image, not by letting the system do it from an image stored off-screen. The \fIDefault\fP setting is retained for one bit deep frame buffers but not for deeper frame buffers. \fIRoot Image\fP is a pull-right that controls the color or pattern on the background (root) window. Select \fIPlain\fP to get your root window back to the default background. Select \fIGroup\fP to show an image that mentions \*(Sd and shows the Sun logo. .TP Repair => Allows you to reset the input mechanism (\fIReset Input\fP) or to repaint all the windows (\fIRepaint All\fP). .TP Exit \*(Sd => This menu allows you to exit \*(Sd gracefully. It is done as a menu in order to avoid accidental invocation. .LP .SS "Window Management" .IX "window management" .IX "user interface" "window management" The standard window management package provides for window manipulation via a pop-up menu invoked from within the frame of a window. Certain functions are also available via accelerators. Here is the window management menu (it is found under the \fIFrame\fP pull-right): .TP Move Lets you move the window by dragging it around with the mouse. Click a mouse button to leave the window at its new location. .TP Move Constrained Lets you move the window, with motion constrained either vertically or horizontally. If you click in the left or right part of the window's frame, you can move the window only horizontally. If you click in the top or bottom part of the window's frame, you can move the window only vertically. Click once more to leave the window at its new location. .TP Top Raises this window above all of the other windows. .TP Bottom Pushes this window below all of the other windows. .TP Zap Causes the current program to exit. .TP Resize Allows you to change the size and placement of a window. Click where you want the upper left corner of the window to be, then drag out a rubber-band rectangle and click where you want the lower right corner to be, just as if you were creating a new window. The window will be resized and moved to the rectangle you just swept out. .TP Stretch Corner Allows you to change a window's size by dragging one corner, leaving the opposite corner fixed where it is. Click a button when the mouse is near the corner you wish to drag; then click again when the rubber-band rectangle is the size you want it to be. .TP Stretch Edge Allows you to drag a window's edge, just like dragging a corner. Click near the edge you want to drag, and then click again when you have placed it. .TP Close Closes this window into an icon. .TP Redisplay Causes the window to redisplay itself. .LP You can use accelerators instead of the menu to manage windows. To raise a window, click the left button in the window's frame. To drag a window, press the middle button in the window's frame, and drag the window into position with the button still down. To close the window into an icon, click the left button in the cycle glyph in the upper left corner of the window. To resize a window, click the left button in the resize glyph in the lower right corner of the window. .LP You can use similar management functions on icons as well as on windows. You can bring up a window management menu over an icon by holding down the right button anywhere in the icon. This menu is similar to the menu for windows, except that it contains the following entries: \fIMove\fP, \fITop\fP, \fIBottom\fP, \fIZap\fP, \fIOpen\fP, \fIOpen&Resize\fP, and\fI Redisplay\fP. The only new function is \fIOpen&Resize\fP. This function opens an icon into a window that you drag out with the mouse. This is in contrast to \fIOpen\fP, which causes the window to open into its original shape. You can use accelerators on icons, too. You can click the left mouse button on an icon to open it, and you can drag an icon to a new location with the middle button. .SS "Interpreter Access" .IX "contacting the server" "interpreter access" .IX "interpreter access" The standard .B init.ps file starts a server listening on port 144 (and then 2000) for client connections. You can use a program called \fIpsh\fP(1) to connect to this port. At this point, you are talking to a \*(Ps interpreter, and you can interact with it in the normal way. However, any errors you make cause the server to break the connection. To put yourself into an environment that is more forgiving of errors, you must type \fBexecutive\fP after you connect. For example, .sp .nf paper% \fBpsh\fP \fBexecutive\fP Welcome to NeWS Version 1.1 .fi .sp Type \fBquit\fP to the interpreter to exit .IR psh . .SS "Remote Access" .IX "contacting the server" "remote access" .IX "remote access" See \fInewshost(1)\fP for information about allowing remote hosts to start applications on your local machine. The default is that other machines can't open connections to your \*(Sd server. .SS "\*(Sd Sockets" .IX "sockets" "priority of connection" .IX "contacting the server" "multiple servers" .IX "multiple servers" If there is no socket specified in the \fLNEWSSOCKET\fP environment variable or in \fLuser.ps\fP, \*(Sd will try to listen on socket \fL144\fP. Since \fL144\fP is a privileged socket, unless \fLnews_server\fP is running as root, the attempt to listen on \fL144\fP will fail, and the \*(Sd server will then try to listen on socket \fL2000\fP. This order of consideration may be overridden by setting the NEWSSOCKET environment variable. The following shell archive allows you to run two \*(Sd servers on two displays: .sp \fL #! /bin/sh FRAMEBUFFER=/dev/bwtwo0 NEWSSOCKET=%socketl2000 news_server & FRAMEBUFFER=/dev/cgtwo0 NEWSSOCKET=%socketl2001 news_server & sleep 5 adjacentscreens /dev/bwtwo0 -r /dev/cgtwo0\fP .sp The socket on which \*(Sd listens can also be set in your \fLuser.ps\fP file with a line of the form: .sp .ft H .LS 4 /NeWS_socket (%socketl2001) def .LE .ft R .sp This will override any socket specified in the \fLNEWSSOCKET\fP environment variable. .SH FILES If .I news_server is unable to open a file whose name doesn't start with /, and which can't be found in your home directory or the directory you started \*(Sd from, it inserts \fI${NEWSHOME}/lib\fP at the front of the name and tries again. .TP 40n ${NEWSHOME}/lib/NeWS/*.ps Startup \*(Ps programs. .TP 40n ${NEWSHOME}/fonts/* Font Library .TP 40n ${NEWSHOME}/bin/news_server the NeWS server .TP 40n ~/user.ps user-definable server customizations; loaded after other system *.ps files .TP 40n ~/startup.ps user-definable server customizations; loaded before other system *.ps files .LP The \fBFRAMEBUFFER\fP environment variable specifies the default frame buffer for \*(Sd. It defaults to \fI/dev/fb\fP. .SH "SEE ALSO" psh(1), psterm(1), psview(1), say(1), newsdemos(6), xdemos(6), journalling(1), kbd_mode(1), newshost(1), psload(1), psman(1), setnewshost(1) .LP .I "NeWS Manual" .LP .IR "PostScript Language Reference Manual" , Adobe Systems Inc., Addison-Wesley .SH BUGS Some parts of the \*(Ps have yet to be implemented. See the chapter in the \fINeWS Manual\fP entitled \fIOmissions and Implementation Limits\fP. .sp The \*(Sd 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. \*(Sd has been designed to print a message on the console about being low on memory when it gets very close to being out of memory. If you see this message then you should immediately reduce the stress on swap space by terminating some large processes [see pstat(8) with the -s flag]. If \*(Sd does completely run out of memory, and it can't recover, then it is designed to print a message on the console about being out of memory and aborting. .sp When running SunView1 program, you may see many ``Window display lock broken...'' messages. You should have a console window for these message to appear in so as to avoid trashing the screen. .SH TRADEMARK \*(Px is a registered trademark of Adobe Systems Inc.