.\" @(#)xdemos.6 9.4 88/01/19 Copyright 1987 Sun Micro .TH XDEMOS 6 "2 December 1987" .IX xdemos(6) "" "\fIxdemos\fP(6) \(em X Window System demonstration" .IX demos "xdemos(6) - X Window System demos" "" "\fIxdemos\fP(6) \(em X Window System demonstration" .SH NAME xdemos \- X Window System demonstration .SH SYNOPSIS \fBX Demos\fP menu item in the NeWS root menu .SH DESCRIPTION The NeWS \fBX Demos\fP are some programs that demonstrate a small subset of the X Window System (version 10) protocol running under NeWS. The X server is written almost entirely in the \*(Ps; the code is contained in the file \fI$NEWSHOME/lib/NeWS/X10.ps\fP. .LP The \fBX Demos\fP pull-right menu has two items: \fBRun a Demo\fP and \fBKill X Server\fP. If the X server is not running, the second menu item will have no effect. .SH "RUNNING DEMOS FROM THE MENU" In order to start an X demo from the NeWS menu, you must pull right from the \fBRun a Demo\fP menu item. This reveals a number of demo programs: \fIAnalog Clock and Load Average.\fP Selecting one of these starts up the corresponding X program. If the X Server has not yet been started, it will be started automatically. The demonstration programs do not bring up windows in the standard NeWS style; they instead conform to the standard X style, which is as follows. First, the name of the program appears in a small window in the upper left-hand corner of the screen. Then, a flickering rectangle or square appears at the current cursor location. This rectangle tracks the motion of the cursor. At this point, you can do one of three things: .RS .5i \fBClick the left button.\fP This brings up a window of default size at the current cursor location. \fBDrag with the middle button.\fP If you hold down the middle button, drag the mouse, and then release the middle button, you can drag out a rubber-band rectangle that specifies the window's location and size. \fBClick the right button.\fP This brings up a window of default size at the default location. .RE If you select \fBKill X Server\fP while any X demos are active, they will be killed along with the server. .SH "WINDOW MANAGEMENT" In the X Window System, the only way to move or resize windows is to use a window manager program. Unfortunately, no X window managers work under NeWS as yet. In order to provide window management facilities to X windows running under NeWS, a special window management menu is made available in all X windows. This menu is accessible from the right mouse button when the cursor is over an X window and it contains the following items: \fIMove, Redisplay, Resize, \fPand\fI Quit.\fP These functions should be self-explanatory. .SH "RUNNING DEMOS FROM A SHELL" In order to run X demos from a shell (on the local machine or on a remote machine) one must set the DISPLAY environment variable properly. The NeWS X server listens for connections on port 5901, which means that the DISPLAY variable should contain the string ``hostname:1'' so that X clients will connect to the proper location. After DISPLAY is set properly, one can start up X demos in the normal X fashion. .SH "SEE ALSO" newsdemos(6) .br \fINeWS Manual\fP .SH BUGS No byte swapping is done. .sp Only a small subset of X requests is implemented. In particular, only programs like \fIxclock\fP and \fIxload\fP. .sp The NeWS X Server accepts only internet-domain connections. UNIX-domain connections are not supported. .sp Running the X demos from the menu can freeze the screen and input if you have a line in your \fL.Xdefaults\fP file similar to the following: .LS 4 8 \&.MakeWindow.Freeze: on .LE Turning on this option causes X clients to issue a slightly different set of requests, two of which the X demo do not handle. The work-around is to change the line in \fL.Xdefaults\fP to: .LS 4 8 \&.MakeWindow.Freeze: off .LE .LP \fL$NEWSHOME/lib/NeWS/demomenu.ps\fP contains an error which causes the X demos to not run sometimes. The work-around is to replace the following lines in \fL$NEWSHOME/lib/NeWS/demomenu.ps\fP: .LS 4 8 .ft H % do "setenv DISPLAY localhost:1" (DISPLAY) (localhost:1) putenv .LE with: .LS 4 8 .ft H % do "setenv DISPLAY `hostname`:1" (DISPLAY) localhostname (:1) append putenv .LE .LP The following is not really a bug as much as an exposure of the NeWS/X interface. X demo windows will not respond to `Repaint All' requests from the root menu, or `Zap All', `Open All' requests from the `All Windows' menu. The `Repaint All' problem is due to a known inadequacy of the current X emulator demo package. 'Zap All' and other selections from the `All Windows' menu have no effect since X and NeWS exist, in essence, in two different worlds. .SH TRADEMARK \*(Px is a registered trademark of Adobe Systems Inc.