NEWS_SERVER(1) — USER COMMANDS
NAME
news_server — NeWS server
SYNOPSIS
news_server [ ]
DESCRIPTION
The news_server command starts the server. The server is an interpreter for a subset of the . The was defined by Adobe Systems Inc. supports many overlapping drawing surfaces, multiple lightweight threads of execution, and message-based interprocess communication. Details of the the structure of are found in the NeWS Manual.
OPTIONS
[ ] The server interprets the program given as an argument on the command line. If no text is given on the command line, news_server executes (NeWS/init.ps) (r) file cvx exec &main This fragment sets up for its normal use as a window server. When specifying this argument, you probably should put single quotes around the “s fragment ” to protect it from premature interpretation by the shell. The files %stdin, %stdout, and %stderr have their normal meanings while this program is executing.
FRAMEBUFFER
Another option is defined by the FRAMEBUFFER environment variable. The device name (e.g., /dev/bwtwo0, /dev/cgtwo0) contained in FRAMEBUFFER tells which frame buffer to display on. If FRAMEBUFFER is not defined then /dev/fb is the default.
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.
Compatibility
may be run either from outside the SunView environment, or from inside the SunView environment by using overview(1). NB: You must be sure that the FRAMEBUFFER environment variable used by the server matches the -d argument used by server matches the -d argument used by suntools. Both of these values default to /dev/fb, so if one is changed, the other must be also: overview -w news_server While running from outside SunView, SunView tool binaries may be executed as normal. Their windows will appear on top of all windows, but will otherwise behave normally.
Root Menu
When starts, using the standard 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):
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!
Applications =>
This menu lets you start up a number of applications.
Terminals is a pull-right menu from which you can create a window using the psterm(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 Fixed Startup, which has the same options as the Terminals menu. If you select one of the terminals from Fixed Startup, 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 Console from either the Terminals menu or the Fixed Startup menu creates an H19 terminal emulator that is set up to receive console messages.
Clocks is a pull-right menu from which you can create a clock. The Plain clock is a simple round clock. The Fancy clock is a stylish modern round clock. Both clocks can be create with an option to show the seconds.
Load Average invokes the psload program. This program is a load average monitor.
Journal causes a journalling mechanism to be loaded into . 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 journalling(1).
Demos =>
Lets you run one of the many demonstration programs. They are described in newsdemos(6).
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.
Zap causes all the windows on the screen to be destroyed.
Open causes all the windows on the screen to be opened.
Close causes all the windows on the screen to be closed.
Flip causes all the windows on the screen to toggle between their open state and their closed state.
Tidy 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.
Close causes all the windows on the screen to be closed.
Here Allows you to position all the windows on the screen with successive clicks of the mouse.
Drop causes all the windows on the screen to “fall” to the bottom of the screen.
Top causes all the windows on the screen to “rise” to the top of the screen.
Bounce 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 Windows command. You can bounce just the icons with the Icons command. You can bounce both with the All command. Stop terminates the bouncing.
SunView1 =>
As mentioned above, you can run existing SunView1 and SunWindows application concurrently with applications.
Selection Transfer lets you exchange selections between applications and SunView applications. NeWS to SunView Shelf takes the current selection and loads it onto the SunView shelf. A subsequent get operation in SunView will retreive the contents of the shelf. SunView to NeWS Shelf takes the current SunView selection and loads it onto the shelf. A subsequent get operation in will retreive the contents of the shelf. Note: There is a race condition between when you invoke one of these shelf transfer menu operations and when you subsequently release the get key. Waiting a second or two between the two operations should avoid any problem.
Applications lets you invoke any of the following SunView applications: shelltool, cmdtool, textedit, mailtool, defaultsedit, iconedit, dbxtool, perfmeter, clock, gfxtool, console, lockscreen. The Default .suntools 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.
User Interface =>
The User Interface menu lets you alter a number of user interface options.
Input Focus is a pull-right that provides you with a choice of keyboard focus mechanisms. Click to Type forces input to occur in whichever window you last clicked the mouse (independent of current cursor location). Follow Cursor forces the input focus to shift to whichever window the cursor is currently in.
Window Management Style pull-right provides you with a number of options for controlling the default behavior of your windows. The Rubber-band Box menu controls the appearance of the rubber-band rectangle that appears when you specify window size; the choices are Thin, Thick and Grid. The Zoom menu controls the speed with which windows zoom into icons and vice versa; the choices are Zoom Slow, Zoom Medium and Zoom Fast. Flip Drag toggles the method of moving windows between dragging the entire window and dragging just its frame.
Look & Feel is a pull-right that allows you to toggle between the standard look and feel and the SunView1 look and feel. Both windows and menus are altered to reflect the chosen look and feel.
Retained Windows is a pull-right that allows you to choose the image saving behavior of newly created windows. If you turn retention On, windows redisplay very quickly, at the expense of more main memory usage. If you turn retention Off, applications redisplay by repainting their image, not by letting the system do it from an image stored off-screen. The Default setting is retained for one bit deep frame buffers but not for deeper frame buffers.
Root Image is a pull-right that controls the color or pattern on the background (root) window. Select Plain to get your root window back to the default background. Select Group to show an image that mentions and shows the Sun logo.
Repair =>
Allows you to reset the input mechanism (Reset Input) or to repaint all the windows (Repaint All).
Exit =>
This menu allows you to exit gracefully. It is done as a menu in order to avoid accidental invocation.
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 Frame pull-right):
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.
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.
Top Raises this window above all of the other windows.
Bottom
Pushes this window below all of the other windows.
Zap Causes the current program to exit.
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.
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.
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.
Close Closes this window into an icon.
Redisplay
Causes the window to redisplay itself.
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.
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: Move, Top, Bottom, Zap, Open, Open&Resize, and Redisplay. The only new function is Open&Resize. This function opens an icon into a window that you drag out with the mouse. This is in contrast to Open, 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.
Interpreter Access
The standard init.ps file starts a server listening on port 144 (and then 2000) for client connections. You can use a program called psh(1) to connect to this port. At this point, you are talking to a 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 executive after you connect. For example,
paper% psh
executive
Welcome to NeWS Version 1.1
Type quit to the interpreter to exit psh.
Remote Access
See newshost(1) 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 server.
Sockets
If there is no socket specified in the NEWSSOCKET environment variable or in user.ps, will try to listen on socket 144. Since 144 is a privileged socket, unless news_server is running as root, the attempt to listen on 144 will fail, and the server will then try to listen on socket 2000. This order of consideration may be overridden by setting the NEWSSOCKET environment variable. The following shell archive allows you to run two servers on two displays: #! /bin/sh
FRAMEBUFFER=/dev/bwtwo0 NEWSSOCKET=%socketl2000 news_server &
FRAMEBUFFER=/dev/cgtwo0 NEWSSOCKET=%socketl2001 news_server &
sleep 5
adjacentscreens /dev/bwtwo0 -r /dev/cgtwo0 The socket on which listens can also be set in your user.ps file with a line of the form: /NeWS_socket (%socketl2001) def This will override any socket specified in the NEWSSOCKET environment variable.
FILES
If 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 from, it inserts ${NEWSHOME}/lib at the front of the name and tries again.
${NEWSHOME}/lib/NeWS/∗.ps Startup programs.
${NEWSHOME}/fonts/∗ Font Library
${NEWSHOME}/bin/news_server the NeWS server
~/user.ps user-definable server customizations; loaded after other system ∗.ps files
~/startup.ps user-definable server customizations; loaded before other system ∗.ps files
The FRAMEBUFFER environment variable specifies the default frame buffer for . It defaults to /dev/fb.
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)
NeWS Manual
PostScript Language Reference Manual, Adobe Systems Inc., Addison-Wesley
BUGS
Some parts of the have yet to be implemented. See the chapter in the NeWS Manual entitled Omissions and Implementation Limits. 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. 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 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. 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.
TRADEMARK
is a registered trademark of Adobe Systems Inc.
Sun Release 4.0 — Last change: 2 December 1987