Graphics Administration Guide for HP-UX 10.20. After using this document for a while, please fill out the Reader Reply form. Or, just e-mail us your comments at muserlink@fc.hp.com Graphics Administration Guide for HP-UX 10.
ABOUT THIS GUIDE ..............................................................................................................................................................6 PREFACE ..................................................................................................................................................................................8 WHY THIS DOCUMENT? ................................................................................................................................
Supported Visuals ............................................................................................................................................................51 Supported Screen Options................................................................................................................................................51 Colormaps and Colormap Management ..........................................................................................................................
RE-INSTALLING POWERSHADE ............................................................................................................................................ 104 3D GRAPHICS PERFORMANCE.............................................................................................................................................. 104 Texture Mapping ............................................................................................................................................................
APPENDIX C: LOW BANDWIDTH X PROXY ............................................................................................................... 156 NAME .................................................................................................................................................................................. 156 SYNOPSIS .....................................................................................................................................................................
About this Guide Graphics Administration Guide: Information for Programmers, System Administrators, and End-Users Copyright © June 1997, June 1998, June 2000 Hewlett-Packard Company HP 9000 Workstations Notices The information contained in this document is subject to change without notice.
Printing History New editions of this manual will incorporate all material updated since the previous edition. Update packages may be issued between editions and contain replacement and additional pages to be merged into the manual by the user. Each updated page will be indicated by a revision date at the bottom of the page. A vertical bar in the margin indicates the changes on each page.
Preface Why This Document? This document was created to fill a need that became evident as Hewlett-Packard began to offer multiple Application Programmer Interfaces (APIs). The situation was this: As HP created one API, say, Starbase, particular aspects of graphical operation were noted and diligently explained in the Starbase documentation. However, some of these aspects were not unique to Starbase, they pertained to graphics operation in general: they applied to all of our APIs.
Document Conventions Below is a list of the typographical conventions used in this document: mknod /usr/include Verbatim computer literals are in computer font. Text in this style is letter-for-letter verbatim and, depending on the context, should be typed in exactly as specified, or is named exactly as specified. In every case... Emphasized words are in italic type. . . .device is a freen. . . New terms being introduced are in bold-faced type. . . .the . . .
Chapter 1: Pathnames This chapter contains information on locating files that reside at some location in the file system. Using “whence” There are two main methods of finding files, assuming you know the name of the file you're looking for.
Subsequent sections of this chapter contain the actual pathnames referred to in other HP graphics API documents, such as Starbase, PEX, etc. A particular paragraph might refer to, say, the directory. Find the API you're looking for. In that section is an alphabetical list of "generic names", the file system path references used in the other documents and with each you will see its actual location in the file system.
HP-PHIGS Page 12 Generic Name Location in the file system /usr/lib/X11/app-defaults /opt/graphics/common /dev /opt/graphics/common/lib/nls/msg/C /opt/graphics/phigs /opt/graphics/phigs/demos /opt/graphics/phigs/examples /opt/graphics/phigs/include /opt/graphics/phigs/lib /opt/graphics/phigs/include/Motif1.
HP PEX Page 13 Generic Name Location in the file system /usr/lib/X11/app-defaults /opt/graphics/PEX5/examples/cge /opt/graphics/PEX5/utilities/cge /opt/graphics/PEX5/contrib /opt/graphics/PEX5/help5.
Chapter 2: Compiling Your Application This chapter provides information for compiling your application with either archived or shared libraries for the following Application Programming Interfaces (APIs): Starbase, HP-PHIGS, and HP PEX. Compiling examples are given for C, Fortran, and Pascal. The actual pathnames of the conceptual () directory names in this chapter depends on the file system structure. See Chapter 1 for details.
By default, the linker program ld(1) looks for a shared library driver first and then the archive library driver if a shared library was not found. By using "-Wl,-a,archive" (or exporting the LDOPTS variable), the -l option will refer only to archive drivers. Because the archive library libhpgfx1.a references functionality in libXext.a, it is necessary to explicitly link libXext.a with your program. Otherwise, the linker will have undefined references.
Compiling with Archive Libraries If you are using archived libraries, you need to include your device's driver library. ___________________________________________________________________________________ Note: Shared libraries are used by default unless you specify that you want to use archived libraries (by specifying "-Wl,-a,archive").
Device Driver Libraries The following tables list the device driver libraries that should be used with particular devices. CRX Family Output Device Integrated Color Graphics (Model 705, 710, 715/33, 715/50, 715/75, 725/50, 725/75) Internal Color Graphics (Model 712/60, 712/80, 712/80i, 712/100, 715/64, 715/80, 715/100, 715/100XC, 725/100) HP CRX/GRX HP Dual CRX HP CRX-24[Z] HP CRX-48Z Link Line Options libddgcrx.a or libddgcrx.sl libddcrx48z.a or libddcrx48z.
HP VISUALIZE-FX Family Output Device HP VISUALIZE-EG HP VISUALIZE-FX2 HP VISUALIZE-FX4 HP VISUALIZE-FX6 HP VISUALIZE-FXE HP VISUALIZE-EG HP VISUALIZE-FX2 HP VISUALIZE-FX4 HP VISUALIZE-FX6 HP VISUALIZE-FXE Page 18 Link Line Options Legacy APIs libddhcrx.a or libddhcrx.sl libddvisx.a or libddvisx.sl libddfxe.a or libddfxe.sl OpenGL libddhcrx.sl libddvisxgl.sl libddvmd.sl libddfxegl.sl Graphics Administration Guide for HP-UX 10.
HP-GL Plotters Output Device HP 7440A HP 7470A HP 7475A HP 7550A HP 7570A HP 7575A HP 7576A HP 7580A/B HP 7585B HP 7586B HP 7595A HP 7596A HP 9111A HP C1600A HP C1601A HP 7510A HP 7550A HP 7570A HP 7575A HP 7576A HP 7580B1 HP 7585B1 HP 7586B HP 7595A/B HP 7596A/B HP 7599A HP C1600A HP C1601A HP C1602A1 HP C1620A HP C1625A HP C1627A HP C1629A HP C1631A Link Line Options libddhpgl.a libdvio.a or libddhpgl.sl libdvio.sl libddCADplt.a or libddCADplt.
Miscellaneous Device Drivers Output Device Link Line Options 1 Remote Rendering: libddvmx.sl Xlib Pixmap (VMX) Remote Rendering: libddsox11.a Xlib 2D protocol (SOX) or libddsox11.sl Display List libdddl.a or libdddl.sl Computer Graphics Metafile libddhpcgm.a (CGM) File Format or libddhpcgm.sl Starbase Memory Driver libddSMDpix.a (pixel-major packing orders) or libddSMDpix.sl Starbase Memory Driver libddSMDpln.a (plane-major packing order) or libddSMDpln.sl The Personal Visualizer libddhpsbv.
Compiling HP PEX Applications HP PEXlib is supported on the Series 700 workstations using shared libraries that must be linked with the application program. Only PEX programs written in C (not FORTRAN or Pascal) are supported. When you compile your PEXlib programs, you must link the application with the PEXlib library libPEX5. ____________________________________________________________________________ Note: The PEX library is dependent on the math library.
Chapter 3: X Windows: HP-UX 10.20 This chapter documents information specific to the HP X server. It describes features unique to HP's X server, provides information on how to configure the X server and includes a list of supported X configurations. For each supported graphics device, device-dependent configuration information is provided.
absent. When only one graphics screen is present, SAM will treat this screen as though it is always configured. Preselecting both configured and unconfigured screens will result in only the first two screen menu options being active. X*screens File For manual changes, please refer to the sample files in the /etc/X11/ directory. Three files of particular interest are the X0screens, X0devices, and X0pointerkeys files.
composed of an optional block specifying device-independent server options followed by one or more either Screen or Single Logical Screen entries (maximum of four graphics devices). The minimum X*screens file is a line with the keyword "Screen" followed by a screen device file. For example: Screen /dev/crt Server Options For more information about server options, or about additional server options, look in an information file (for example, /usr/lib/X11/Xserver/info/screens/hp).
Layer | Specify the layer of the default visual. Transparent Specify that a visual with an application-accessible transparent entry in the default colormap be used. Specifications in the "DefaultVisual" section, except for "Depth", are ignored on VRX devices. See the "ScreenOptions" section below for VRX-related options. MonitorSize Inches | MM Specify the diagonal size of the monitor.
• This is the minimum specification for a two-screen configuration. The maximum number of screens supported on the X server is four. Here, the displays associated with /dev/crt0 and /dev/crt1 are referred to as ":0.0" and ":0.1", respectively. Screen /dev/crt0 Screen /dev/crt1 Figure 2: Two Physical Displays, Two Separate Screens • This sample X*screens file could be used on a system using Internal Color Graphics with a 17inch monitor.
Screen /dev/crt DefaultVisual Transparent • The display diagram would be the same as that of the "Results of Minimal Legal X*screens File" configuration, above. This sample X*screens file could be used on a system with a HCRX-8 graphics device. By default on the HCRX-8, the overlay visual does not have a transparent entry available to applications for rendering transparency. If an application requires overlay transparency, an optional X server mode is available, but it is restrictive.
SingleLogicalScreen 1 4 /dev/crt0 /dev/crt1 /dev/crt2 /dev/crt3 Figure 4: Four Physical Displays, Single Logical Screen (1X4) SingleLogicalScreen 4 1 /dev/crt0 /dev/crt1 /dev/crt2 /dev/crt3 Figure 5: Four Physical Displays, Single Logical Screen (4X1) SingleLogicalScreen 2 2 /dev/crt0 /dev/crt1 /dev/crt2 /dev/crt3 Page 28 Graphics Administration Guide for HP-UX 10.
Figure 6: Four Physical Displays, Single Logical Screen (2X2) • It is possible to include a Screen Entry and an SLS Screen Entry in the same X*screens File. This creates a situation where there are two X Screens (e.g. :0.0 and :1.0), one of which happens to be a Single Logical Screen.
Miscellaneous Topics Double Buffer Extension (DBE) DBE is an extension to the X server that provides a double-buffering Application Programming Interface (API). ____________________________________________________________________________________ Note: MBX (the Multi-Buffering eXtension to X) has not been adopted as an industry standard, as DBE has. Thus, it is recommended that applications that use MBX be ported to DBE usage in preparation for future MBX obsolescence (HP-UX 11.0).
can be deduced from any of the following: the magnitude of the difference of two performance levels, a performance level in isolation, or comparing performance levels from different servers. For more information, refer to the DBE man page on XdbeScreenVisualInfo().
Power-Saving States Defined by VESA Level State DPMS Compliance DPMS Compliance Requirements State Power Savings Recovery Time 0 1 2 3 Very Short (<1 sec) Short Longer System Dependent Requirements Screen Saver Stand-by Suspend Off Not Applicable Optional Mandatory Mandatory None Minimal Substantial Maximum The actual amount of power saved and the recovery time for each of the states is monitor-dependent and may vary widely.
to allow for synchronization with vertical retrace. To activate this optional X server mode, set the SwapBuffersOnVBlank Screen Option in the X*screens file before the X server is started. ____________________________________________________________________________________ Note: MBX_SWAP_BUFFERS_ON_VBLANK is obsolete with this release. The SwapBuffersOnVBlank Screen Option works for both DBE and MBX.
Supported Devices The X server supports the MIT shared memory extension on the following devices: • Internal Color Graphics • Integrated Color Graphics • CRX-24[Z] • CRX-48Z • HCRX-8[Z] • HCRX-24[Z] • HP VISUALIZE-EG • HP VISUALIZE-8 • HP VISUALIZE-24 • HP VISUALIZE-48[XP] • HP VISUALIZE-FX2 • HP VISUALIZE-FX4 • HP VISUALIZE-FX6 • HP VISUALIZE-FX5 and FX10 • HP VISUALIZE-FXE Shared Memory Transport (SMT) Shared Memory Transport (SMT) is a means to more rapidly transport large amounts of data from the clien
A display name of the form unix:0.0 will force the use of Unix Domain Sockets (UDS), which is identical to the local transport used before HP-UX 10.20. A display name of the form nn.nn.nn.nn:0.0 (where nn.nn.nn.nn is an IP address) will force the use of Internet Sockets, which is the remote transport normally used, and which can be used locally. (This will be slow.) It is possible that an application which violates the X interface standard will run correctly using UDS, but hang or coredump when using SMT.
In either case, the format and meaning of the fields is the same: [, [, ]] with no embedded blanks, e.g. 32000,16000,5000 32000 0 Although the default is "SMTSizes 0,0,0," a specification of "SMTSizes 100000,90000,90000" is optimal in most situations if SMT is desired. The values are accepted as positive decimal, hex, or octal values according to the C conventions.
Enabling and Disabling of SMT The special value of 0 for Region Size specifies that SMT is to be disabled. Disabling SMT removes it from the Xserver causing it not to be available for any transports. Any non-zero Region Size enables SMT on the Xserver. The default Region Size for a diskless Xserver is zero (disabling SMT from the Xserver) to minimize the access of files across the network. The default Region Size for non-siskless Xserver is 100000 (which is rounded to 0x19000).
HP Color Recovery Color Recovery is a technique that generates a better picture by eliminating the graininess caused by traditional dithering techniques.
Dynamic Loading HP's X server now dynamically loads the appropriate device drivers and extensions based on the target graphics display device and the extensions the device driver supports. This feature should be transparent to X server users. When possible, the loading of X extensions is deferred until the first protocol request is encountered for a given extension. This feature should be transparent to X server users; however, it is expected to provide some performance enhancement.
For example: Screen /dev/crt/ ScreenOptions EnableIncludeInferiorsFix This gives a system administrator control over when the fix is active and when it is not. In this way, each site can evaluate whether or not it is beneficial to enable this fix. Shared Memory Usage With 3D Graphics Graphics processes use shared memory to access data pertaining to the display device and X11 resources created by the server. ("Resources" includes windows, colormaps, and cursors.
It is also possible to decrease the size of GRM shared memory. You may want to do this if you want to reduce the swap-space requirements of your system and/or you do not intend to run any 3D graphics processes. For example, you could reduce graphics shared memory size to 0x100000 (one megabyte). Count Transparent In Overlay Visual In some configurations, an 8-plane overlay visual may have less than 256 colors. This should not cause a problem for most applications.
Examples of Relevant Graphics Device: Integrated Color Graphics, Color Graphics cards, Internal Color Graphics X*screens File Screen Option To Use: 3BitCenterColor Image Text Via BitMap When using the Xlib XDrawImageString() call to draw text, a visual effect may be seen where text appears to flicker as the background and foreground are drawn in distinct graphics operations. This option is available to eliminate the flicker effect but at the expense of reduced text performance.
Special device files are created by using SAM (the System Administration Manager tool): • From SAM's main window, double-click "Peripheral Devices". • From the "Peripheral Devices" window, double-click "Cards". • A window will appear, containing a list of all cards that are in your machine. Once you select any of them (by single-clicking), the "Actions" menu will contain the options "Show Device Files" and "Create Device Files." Choose whichever option you desire.
Multi-Seat A configuration with multiple instantiations of the X server, each with its own mouse, keyboard, and display(s). Multi-seat is not currently supported in any HP-UX 10.* release. Figure 9: Multi-Seat Single Logical Screen A configuration in which a single X server with a single mouse and keyboard drives multiple homogeneous graphics devices concurrently while allowing the displays to emulate a large single screen.
Figure 10: Single Logical Screen ____________________________________________________________________________________ Note: Different monitor resolutions are not supported with the multi-display configurations unless stated otherwise in the table below. ____________________________________________________________________________________ Multi-Screen Support The list of supported multi-display configurations is rather large, and it changes whenever a new graphics device is introduced.
__________________________________________________________________________________ Note: The on-board and "card" versions of the same device can be considered identical; for example, you could use an on-board HP VISUALIZE-EG graphics device and an HP VISUALIZE-EG graphics card, and still consider them identical devices, thus permitting a 1X2 SLS or a 2X1 SLS.
____________________________________________________________________________________ Note: DHA (Direct Hardware Access) is not supported in a window that spans multiple screens. This means, for example, that while graphics is supported to a window spanning two or more screens, accelerated graphics is not.
This behavior is the result of HP VUE's naive assumption that it is running against one large screen; it centers these windows accordingly. If you are using the default HP VUE key bindings, you can easily reposition the Front Panel so that it is completely contained within one physical screen: 1. 2. 3. 4. With the input focus on the Front Panel, press (on older keyboards, use ). With the Front Panel menu posted and the "Move" menu item selected, press (on older keyboards, ) to start the move.
For example, to configure SLS/d slave X servers on hpslsd1, hpslsd2, hpslsd3, and hpslsd4, do the following as root: • • Copy each system's /etc/X11/X0screens file to /etc/X11/X50screens (the use of "50" as the display name is an SLS/d convention only; you can choose any number from 0-99 that meets your needs). Unless you're making changes to screen options or server options, you need not edit this file any further.
Edit the /etc/X11/X0screens file and enter: SingleLogicalScreen 1 4 hpslsd1:50 hpslsd3:50 hpslsd4:50 hpslsd2:50 Then, on the master system, make sure that SLSd_daemon is running and enter init state 4 (e.g., as root: /etc/init 4). You will notice all of the slave X servers starting in turn, then finally when the master initializes, you will see your CDE environment start.
Integrated Color Graphics Device-Dependent Information This sections includes information on Integrated Color Graphics and Color Graphics cards.
a technicolor effect, the application whose colormap was last downloaded in the hardware colormap would look correct. Accessing HP Color Recovery Technology via Xlib Color Recovery is a technique to generate a better picture by attempting to eliminate the graininess caused by dithering. Access to the Color Recovery capability is transparent when using a 3D graphics API such as Starbase, HP-PHIGS or PEX.
A pixel to be dithered is sent to the routine provided in this example. The values of the variables RedValue, GreenValue, and BlueValue are generated by an application. In this example, the color values are assumed to be in the range 0..255. The given routine receives the color values and the X and Y window address (Xp and Yp) of the pixel. The X and Y address is used to access the dither tables. The values from the dither tables are added to the color values.
/* Check for overflow or underflow on green value */ if (green > 0xff) green = 0xff; if (green < 0x00) green = 0x00; /* Generate the blue dither value */ blue += (dither_blue[y_dither_table][x_dither_table]<<1); /* Check for overflow or underflow on blue value */ if (blue > 0xff) blue = 0xff; if (blue < 0x00) blue = 0x00; /* Generate the pixel value by "or"ing the values together */ pixel = ((red & 0xE0) | ((green & 0xE0) >> 3) | ((blue & 0xC0) >> 6)); return(pixel); } Internal Color Graphics, Internal Gra
• CRX-24[Z] Device-Dependent Information Supported Visuals The following visuals are supported: • • • • • • Class PseudoColor Depth 8 Layer Image supports DBE and MBX hardware double-buffering Class PseudoColor Depth 8 Layer Overlay supports DBE and MBX software double-buffering Class DirectColor Depth 12 Layer Image supports DBE and MBX hardware double-buffering Class TrueColor Depth 12 Layer Image supports DBE and MBX hardware double-buffering Class DirectColor Depth 24 Layer Image doesn't support DBE a
When this option is enabled, the X server does the following: • • • Specifies that the overlay visual has 256 entries. Creates the default colormap with entry 255 pre-allocated to Transparent. A client calling XAllocNamedColor for entry Transparent in the default colormap will be returned entry 255. For all other colormaps, returns all 256 entries as allocable, but issues a warning message: Warning: XCreateColormap is creating 256 entry cmaps in overlay visual.
• Clients requesting (via XAllocNamedColor) the rgb.txt value of Transparent are not returned entry 255. This default behavior can be changed by setting the CountTransparentInOverlayVisual screen option. When this option is enabled, the X server does the following: • • • Specifies that the overlay visual has 256 entries. Creates the default colormap with entry 255 pre-allocated to Transparent. A client calling XAllocNamedColor for entry Transparent in the default colormap will be returned entry 255.
The HP VISUALIZE-48[XP] is a two-board accelerated device that fills two slots. If you add either the optional texture-mapping memory card or the optional video-out card, it becomes a three-board set that fills three slots. Add both optional cards, and it becomes a four-board set, but it still fills only three slots. In any case, it has eight overlay planes, two banks of 24 image planes, and six hardware colormaps. This device provides a superset of functionality in the CRX-48Z.
• • • • Class DirectColor Depth 12 Layer Image supports DBE and MBX hardware double-buffering Class TrueColor Depth 12 Layer Image supports DBE and MBX hardware double-buffering Class DirectColor Depth 24 Layer Image doesn't support DBE and MBX double-buffering Class TrueColor Depth 24 Layer Image doesn't support DBE and MBX double-buffering The following visuals are supported on the HP VISUALIZE-48[XP]: • • • • • • • Class PseudoColor Depth 8 Layer Image supports DBE and MBX hardware double-buffering Cl
The modes are set from the Boot-Admin at bootup time by selecting from the menu of options a configuration that supports double-buffer or not. From that point on (without rebooting) the server will use the selected mode. Eight-plane mode is compatible with the Integrated Color Graphics device. It has eight image planes and uses only software double-buffering. Double-Buffer mode is compatible with the HCRX-8 device. This mode requires an optional memory daughter card.
To obtain hardware double-buffering, find a visual in the image planes. The best method is to find all the depth-8 PseudoColor visuals returned by XGetVisualInfo and then eliminate the visuals that are reported in the SERVER_OVERLAY_VISUALS property (discussed below). If you have an application that assumes the default visual has fast double-buffering, specify an image plane visual as the default.
Overlay Transparency on the HCRX-24[Z], HP VISUALIZE-24, and HP VISUALIZE-48[XP] The HCRX-24[Z], HP VISUALIZE-24, and HP VISUALIZE-48[XP] have two visuals in the overlay planes, both depth-8 PseudoColor. The default overlay visual has 256 entries per colormap and no transparency. The second overlay visual has 255 entries per colormap and supports transparency in the same way as the CRX-24[Z].
{ /* Since the Atom exists, request the property's contents. */ bytesAfter = 0; numLongs = ( nVisuals * sizeof(OverlayVisualPropertyRec) + 3 ) / 4; XGetWindowProperty(display, RootWindow(display, screen), overlayVisualsAtom, 0, numLongs, False, AnyPropertyType, &actualType, &actualFormat, &numLongs, &bytesAfter, &pOverlayVisuals); if ( bytesAfter != 0 ) {/* Serious Failure Here */} ; /* Loop through the pOverlayVisuals array. */ ...
installed in the hardware, plus one other hardware colormap available to applications. The image planes contain two hardware colormaps each usable by applications. When the default visual is in the image planes and the screen option EnableOverlayTransparency is not set, the overlay planes contain a single hardware colormap available to applications, plus a colormap reserved by the server (i.e.
_HP_RGB_SMOOTH_MAP_LIST is a list of colormaps that are associated with window visual IDs that support Color Recovery. When the XGetRGBColormaps routine searches this list for a colormap with a visual ID that matches your window's visual ID and it finds one, your application knows that your visual supports Color Recovery, and uses that colormap for any Color Recovery window in your window's visual. Color Recovery uses all 256 entries of one of the available colormaps.
y_dither_table = Yp % 2; /* Y Pixel Address MOD 2 */ /* Start with the initial values as supplied by the calling routine */ red = RedValue; green = GreenValue; blue = BlueValue; /* Generate the red dither value */ if (red >= 48) /* 48 is a constant required by this routine */ red=red-16; else red=red/2+8; red += dither_red[y_dither_table][x_dither_table]; /* Check for overflow or underflow on red value */ if (red > 0xff) red = 0xff; if (red < 0x00) red = 0x00; /* Generate the green dither value */ if (green
HP VISUALIZE-FX (FX2, FX4 and FX6) Device-Dependent Information This section includes information on the HP VISUALIZE-FX2, HP VISUALIZE-FX4 and HP VISUALIZE-FX6 graphics devices: • • • The HP VISUALIZE-FX2 has 8 overlay planes, 24 image planes, a 24-bit Z buffer and 8 hardware colormaps. The HP VISUALIZE-FX4 has 8 overlay planes, 48 image planes, a 24-bit Z buffer and 8 hardware colormaps.
The following visuals are enabled by default on the HP VISUALIZE-FX2: • • • • • • • • Class PseudoColor Depth 8 Layer Imagesupports DBE hardware double-buffering Class PseudoColor Depth 8 Layer Overlaysupports DBE software double-buffering Class PseudoColor Depth 8 Layer Overlay Transparentsupports DBE software double-buffering Class TrueColor Depth 8 Layer Imagesupports DBE hardware double-buffering Class DirectColor Depth 12 Layer Imagesupports DBE hardware double-buffering Class TrueColor Depth 12 Layer
In stereo mode, the following visuals are enabled by default on the HP VISUALIZE-FX4 and HP VISUALIZE-FX6: • • • • • • • • Class PseudoColor Depth 8 Layer Image supports DBE hardware double-buffering Class PseudoColor Depth 8 Layer Overlay supports DBE software double-buffering Class PseudoColor Depth 8 Layer Overlay Transparent – supports DBE software double-buffering Class TrueColor Depth 8 Layer Image supports DBE hardware double-buffering Class DirectColor Depth 12 Layer Image supports DBE hardware dou
Supported Screen Options The following Screen Options are supported: • • • • • CountTransparentInOverlayVisual ImageTextViaBitMap EnableIncludeInferiorsFix Enable12BitPseudoColorVisual DisableGlxVisuals The following additional screen options are supported on the HP VISUALIZE-FX2, HP VISUALIZEFX4 (stereo mode) and HP VISUALIZE-FX6 (stereo mode): • • Disable12BitDirectColorVisual Disable12BitTrueColorVisual The following additional screen options are supported on the HP VISUALIZE-FX4 (non-stereo mode) an
} OverlayVisualPropertyRec; OverlayVisualPropertyRec *pOverlayVisuals, *pOVis; XVisualInfo getVis; XVisualInfo *pVisuals; Atom overlayVisualsAtom, actualType; ... /* Get the visuals for this screen and allocate. */ getVis.screen = screen; pVisuals = XGetVisualInfo(display, VisualScreenMask, &getVis, &nVisuals); pOverlayVisuals = (OverlayVisualPropertyRec *) malloc ( (size_t)nVisuals * sizeof(OverlayVisualPropertyRec) ); /* Get the overlay visual information for this screen.
Disabling the GLX Visuals The HP VISUALIZE-FX2/4/6 products are the first set of HP graphics devices that supports the OpenGL extension to X (GLX). If HP OpenGL is installed on an HP VISUALIZE-FX2/4/6 system, then the GLX extension offers new entry points for obtaining more information about X visuals. As part of offering extended visual information, some extra X visuals appear in the X visual list. The extra visuals are simply duplicates of visuals that would normally appear in the X visual list.
HP VISUALIZE-FXE, FX5 and FX10 Device-Dependent Information Disable 12 Bit Direct Color Visual This section includes information on the HP VISUALIZE-FXE, FX5 and FX10 graphics devices. The HP VISUALIZE-FXE/5/10 has 8 overlay planes, 48 image planes a 24-bit z buffer and 4 hardware colormaps. HP VISUALIZE-FXE/5/10 graphics devices contain 2D hardware acceleration similar to that in other HP VISUALIZE devices, as well as 3D acceleration for lighting, shading and texture mapping.
Supported Screen Options The following screen options are supported: • • • • CountTransparentInOverlayVisual ImageTextViaBitMap EnableIncludeInferiorsFix DisableGlxVisuals HP VISUALIZE-FXE/5/10 Configuration Hints Overlay Visuals and Overlay Transparency HP VISUALIZE-FXE/5/10 devices have two visuals in the overlay planes, both depth-8 PseudoColor. The first (default) overlay visual has 256 entries per colormap and no transparency.
HP VISUALIZE-FXE/5/10 Colormaps HP VISUALIZE-FXE/5/10 devices have a total of 4 hardware colormaps. 2 of the colormaps are dedicated to the overlay planes. The remaining 2 colormaps are dedicated to the image planes. Of the 2 overlay colormaps, one is permanently reserved for the default colormap. The other overlay colormap is available to applications.
Supported Screen Options The following Screen Options are supported: • FreedomVideoFormat Freedom Video Formats Freedom Series graphics devices have the ability to support several different video formats. The default format is 1280X1024 @ 75 Hz VESA timing. Other supported video formats may be selected by using the FreedomVideoFormat screen option in the appropriate X*screens file. This screen option replaces the 9.07 environment variable, ES_VIDEO_FORMAT.
VRX Device-Dependent Information This section includes information on the PersonalVRX (PVRX) and TurboVRX (TVRX) graphics devices. ____________________________________________________________________________________ Note: The PersonalVRX and the TurboVRX are no longer supported as of the February, 1999 10.20 Xserver cumulative patch; the information below is presented for those who are running previous versions of the operating system.
In overlay mode, the X server runs only in the overlay planes. Since only 3 or 4 planes are available in the overlay planes on VRX devices, the number of colors is very limited. To operate in overlay mode, the overlay device file should be specified as the primary screen device. For example: /dev/ocrt or /dev/o4crt # Overlay mode using 3 overlay planes # Overlay mode using 4 overlay planes In combined mode, the X server runs in both image and overlay planes.
Chapter 4: X Windows Configuration Details This chapter discusses several details concerning the configuration of X hosts, colormaps, mouse, and keyboard. Making an X*.hosts File The /etc/X0.hosts file is an ASCII text file containing the hostnames of each remote host permitted to access your local server. • • If you are running as a stand-alone system, you must have your system's name in this file. If you are part of a network, the other system names must be included.
____________________________________________________________________________________ Note: The number in an Xnscreens file does not necessarily refer to a physical screen number; any meaning implied by the number is for the user to define. There are no semantics applied to the number except that the Xnscreens files are used when X is started on display :n.0.
hp-HIL input devices can plug into other hp-HIL devices, with up to seven input devices connected together. If there are no DIN input devices connected, and there are multile hp-HIL input devices, the following algorithm is used to choose an X keyboard and pointer device. 1. If no explicit specification is made through the X*devices file, the last mouse (the one farthest from the computer on the hp-HIL line) is used as the X pointer and the last keyboard is used as the X keyboard.
Explicitly Specifying Input Device Use The X server can be explicitly configured to use a specific input device as the X pointer or X keyboard, or merge the data from an input device with that from the X pointer or keyboard. This configuration is done by adding information to the X*devices file. There is one syntax to use for hp-HIL devices, and another syntax for devices that require a device driver to be loaded by the X server (such as RS-232 devices).
The following example specifies a Spatial System Spaceball® connected to the serial port associated with device file /dev/tty0p0 as the X pointer: Begin_Device_Description Name spaceball.1 Path /dev/tty0p0 Use pointer End_Device_Description More examples of input device specifications for RS-232 input devices are in the /usr/newconfig/etc/X11/X0devices file.
This syntax should not be used if more than one X server will be run on the same computer, or if non-X programs will be directly accessing input devices. The X server interprets "first" to mean "first accessible", so you may not always get the first on the hp-HIL, just the first one not already in use.
If you had a more complicated configuration, such as two graphics tablets, two keyboards, and a barcode reader, your X*devices file could look like this: • • • • • first tablet pointer The pointer second tablet other Merged with the pointer first keyboard other Merged with the keyboard second keyboard keyboard The keyboard first barcode other Merged with the keyboard In this example, the first tablet acts as the pointer, the second keyboard acts as the keyboard, input from the second tablet is treated as
Redefining the hp-HIL Search Path The X*devices file can be used to redefine the path searched for hp-HIL devices. By default, the path searched is /dev/hil. The device files are named by appending the numbers "1" through "7" to the path. The path is redefined by adding an entry to the X*devices file with the following form: # where: Specifies the path to be searched for the hp-HIL input devices. # Describes the path.
Initializing the Colormap with xinitcolormap The xinitcolormap client initializes the X colormap. Specific X colormap entries (pixel values) are made to correspond to specified colors. An initialized colormap is required by applications that assume a predefined colormap (for example, many applications that use Starbase graphics). xinitcolormap has the following syntax: xinitcolormap [] where the are: -f Specifies a file containing a colormap.
Customizing the Mouse and Keyboard This section describes the following customizations: • • • • Changing mouse button actions. The xmodmap client. Going mouseless. Customizing keyboard input.
The xmodmap utility can be used to change mouse button mappings. The syntax for changing mouse button mappings with xmodmap is: xmodmap {-e "pointer = {default | number [number...] }" | -pp} -e Specifies a remapping expression. Valid expressions are covered in "Customizing Keyboard Input". default Set mouse keys back to default bindings. number Specifies a list of button numbers to map the mouse keys to. The order of the numbers refers to the original button mapping. pp Print the current pointer mapping.
The X*pointerkeys file lets you specify: • • • • • • • • • The keys that move the pointer. The keys that act as pointer buttons. The increments for movement of the pointer. The key sequence that resets X11. The pixel threshold that must be exceeded before the server switches screens. That button chording is enabled or disabled. That button latching is enabled or disabled. Tablet subsetting. Screen switching behavior for multi-screen configurations.
Creating a Custom X*pointerkeys File You need to modify the existing X0pointerkeys file only if one or more of the following statements are true: • • • You want to use the keyboard for a pointer. You want to change the pointer keys from their default configuration. You use the X0screens file to configure your display. You need to create a custom X*pointerkeys file only if the following statements are true: • • • You want to use the keyboard for a pointer.
ointer Movement Functions Movement Option Function Default Key Move the pointer to the left. pointer_left_key keypad_1 Move the pointer to the right. pointer_right_key keypad_3 Move the pointer up. pointer_up_key keypad_5 Move the pointer down. pointer_down_key keypad_2 Add a modifier key to the pointer pointer_key_mod1 (no default) direction keys. Add a second modifier key to the pointer_key_mod2 (no default) pointer direction keys.
Button Operation Functions Button Operation Perform button 1 operations Perform button 2 operations Perform button 3 operations Perform button 4 operations Perform button 5 operations Function pointer_button1_key pointer_button2_key pointer_button3_key pointer_button4_key pointer_button5_key Default Key keypad_* keypad_/ keypad_+ keypad_keypad_7 You can change the mapping of buttons on the pointer by using options in the X*pointerkeys file.
Button Chording Option Turn button chording off or on Function button_chording Default Action On for devices with two buttons, off for devices with more than two buttons Button chording refers to the generation of a button-press by pressing two other buttons. If you have a two-button mouse, you can generate Button 3 by pressing both buttons together.
You can also use the X*pointerkeys file to control screen switching behavior in multi-screen configurations. See the example X*pointerkeys file in /usr/lib/X11 for an example of this functionality. ____________________________________________________________________________________ Note: The sample X*pointerkeys file is placed in /usr/lib/X11 at install time. If you subsequently update your system, the X*pointerkeys file in /usr/lib/X11 is not overwritten, and the sample file is placed in /usr/newconfig.
However, suppose you wanted to move only one pixel to the left. Although the default value of pointer_mod2_amt is one pixel, no key is assigned to the modifier for that amount. Thus, you would need to edit the X0pointerkeys file (or create an X*pointerkeys) to include a line assigning one of the modifier keys to pointer_amt_mod2.
The easiest way to solve this dilemma is to call in another modifier. The following lines illustrate this. Compare them to the previous example. ###pointer function key pointer_key_mod1 left_shift pointer_key_mod2 left_extend pointer_left_key cursor_left pointer_right_key cursor_right pointer_up_key cursor_up pointer_down_key cursor_down In this example, • Pressing the • Pressing • Pressing key moves the hpterm text cursor up. moves the cursor up in the program you frequently operate. moves the pointer up.
-quiet Turns off verbose logging. This is the default. -n Lists changes to key mappings without actually making those changes. -e Specifies a remapping expression to be executed. -pm, -p Prints the current modifier map to the standard output. This is the default. -pk Prints the current keymap table to the standard output. -pp Print the current pointer map to the standard output. Specifies that the standard input should be used for the input file.
For example, on a PC-style keyboard, you can press capital "D", to print something else, and to print a lower case "d", to print still something else. to print a The xmodmap client gives you the power to change the meaning of any key at any time or to install a whole new key map for your keyboard. Examples Suppose you frequently press the key at the most inopportune moments. You could remove the lock key from the lock modifier, swap it for the key, then map the key to the lock modifier.
Printing a Key Map The -pk option prints a list of the key mappings for the current keyboard. xmodmap –pk The list contains the keycode and up to four 2-part columns. The first column contains unmodified key values, the second column contains shifted key values, the third column contains meta ( ) key values, and the fourth column contains shifted meta key values. Each column is in two parts: hexadecimal key symbol value, and key symbol name.
Default Keyboard Mapping The default keyboard mapping supplied with the X Window environment maps the C1429 keyboard to the same key symbols that are used for the 46021 keyboard. This allows existing X client programs that expect to receive input from a 46021 keyboard to be used with either keyboard. However, the result is that some keys on the C1429 keyboard are mapped to key symbols that do not match the engravings on their keycaps.
may have to be restarted in order to recognize the new mapping. For more information about using the xmodmap client, see the xmodmap man page. C1429 Keyboard Execute the following command to change the mapping of the keys shown above to match the engravings on the C1429 keycaps. /usr/bin/X11/xmodmap /usr/lib/X11/XPCmodmap 46021 Keyboard Execute the following command to change the mapping to match the 46021 keyboard.
Chapter 5 PowerShade: Enhanced 3D Rendering in Software PowerShade is software that allows lighting, shading, and hidden-surface removal. It offers the capability for both surface rendering and volumetric rendering. (Volumetric rendering is available on supported devices only.) PowerShade is not supported on the GRX or on any grayscale version of the Models 705, 710, 715 or 725. (See your Owner's Guide for more details on hp 9000 workstations.
Re-Installing PowerShade PowerShade comes bundled with the hp-UX operating system, but in case you ever need to re-install it, do the following: 1. 2. Follow the instructions in the hp-UX manual Managing hp-UX Software with SD-UX to install software (using the /usr/sbin/swinstall process). Select the PowerShade product for installation.
Other features are available (listed as "Factors Affecting Performance:") but should be used with discretion as performance is significantly slower if even one of these features is used. ____________________________________________________________________________________ Note: The following tables were complete and accurate as of the date of publication of this document. Updates to the table, if any are necessary, will be included in the on-line release notes for the current release. See the 10.
hp PEX Graphics Performance Optimized vs.
Window Conditions Performance Optimized For: • Window unobscured or obscured only by overlay windows Factors Affecting Performance: • Window obscured by many other image plane windows • Backing store enabled (on supported devices) FillArea Primitives Performance Optimized For: Factors Affecting Performance: • More than 64 vertices in a single facet • Best: shared vertex primitives with many vertices: • Multiple Fill Areas in a set o PEXTriangleStrip, • Color approximation type PEXColorRange PEXExtTriangle
Performance Optimized For: • Many markers per call: o PEXMarkers, PEXOCCMarkers, PEXhpMarkersWithData Performance Optimized For: • • • Polymarker Primitives Factors Affecting Performance: Longer strings Best: simple text: o PEXText, PEXText2D, PEXEncodedText, PEXEncodedText2D Fair: annotation text: o PEXAnnotationText, PEXAnnotationText2D Page 108 • • Color per vertex (PEXColorTypeIndexed, PEXColorTypeRGB) Color approximation type PEXColorRange Text Primitives Factors Affecting Performance: • Poly
hp-PHIGS Graphics Performance Optimized vs.
Window Conditions Performance Optimized For: Factors Affecting Performance: • Window unobscured or obscured only by • Window obscured by other image plane overlay windows windows • Backing store enabled (on supported devices) Fill Area Set Primitives Performance Optimized For: Factors Affecting Performance: • More than 64 vertices in a single facet • Best: shared vertex primitives with many vertices: • Multiple Fill Areas in a set o ptri_strip3_data (C), ptst3d • 2D polygons (FORTRAN) • Pseudo colour mappi
Polymarker Primitives Performance Optimized For: Factors Affecting Performance: • These vertex data: • Many markers per call: o Indirect colour o ppolymarker3 (C), ppm3 o RGB colour (FORTRAN) o ppolymarker (C), ppm (FORTRAN) • Pseudo colour mapping method Text Primitives Performance Optimized For: Factors Affecting Performance: • Longer strings • Polygonal text fonts • Best: simple strings: • ptext3 (C), ptx3 (FORTRAN) • ptext (C), ptx (FORTRAN) • Fair: annotation text: • panno_text_rel3 (C), patr3 (FORTRAN
Starbase Graphics Performance Optimized vs.
Window Conditions Performance Optimized For: Factors Affecting Performance: • Window unobscured or obscured only by • Window obscured by many other image overlay windows plane windows • Backing store enabled (on supported devices) Polygon Primitives Performance Optimized For: Factors Affecting Performance: • More than 64 vertices in a single facet • Best: shared vertex primitives with many vertices: • 2D polygons o triangular_strip, • Device coordinate polygons triangular_strip_with_data • shade_mode set t
Polymarker Primitives Performance Optimized For: Factors Affecting Performance: • Many markers per polymarker3d or • These vertex formats: o RGB/vertex polymarker_with_data3d o Indirect color o Intensity • shade_mode set to CMAP_MONOTONIC Performance Optimized For: • Longer strings Page 114 Text Primitives Factors Affecting Performance: • Polygonal text • Spline fonts Graphics Administration Guide for HP-UX 10.
Chapter 6: Miscellaneous Topics 3D Thread-Safing General Information For hp-UX release 10.30 and later, Hewlett-Packard's 3D graphics APIs are supported in multi-threaded applications (using POSIX threads). However, these libraries are thread-restricted and can be accessed only from a single dedicated thread of a multi-threaded program. This documentation is not a tutorial on threads programming or multiprocessing application issues.
Other Threads-Related Information 1. 2. 3. 4. All of the 3D graphics functions are cancellation points. None of the 3D graphics functions are async-cancel safe. None of the 3D graphics functions are async-signal safe. None of the 3D graphics functions are fork-safe, i.e., they cannot be called by a child process after a fork(2), but before an exec(2).
SIGCHLD and the GRM Daemon The Graphics Resource Manager Daemon (grmd) is started when the X11 Server is started. In normal operation, a Starbase, hp PEX, or hp-PHIGS application will not start the daemon, and so will not be affected by the SIGCHLD manipulation that occurs as part of that startup (see below). However, if the grmd dies for some reason, the graphics libraries will restart the daemon whenever they need shared memory.
SIGCHLD and the Starbase Input Daemon The Starbase input daemon is started whenever tracking or event monitoring is enabled. When tracking and event monitoring are turned off or when the output device is closed, Starbase terminates the daemon, using this process: 1. 2. 3. 4. Set the SIGCHLD action to SIG_DFL, saving the old action. Send a message to the input daemon asking it to terminate. Call waitpid(2) to wait for the daemon's death. Restore the saved SIGCHLD action.
Why Is Gamma Correction Needed? The intensity of light generated by a conventional monitor is non-linear with respect to the signal applied. The intensity output is approximately equal to the applied voltage raised to a power. This power is referred to as the gamma of the monitor. Stated mathematically, intensity = voltagegamma For example, the gamma value of a properly adjusted monitor is usually between 2.35 and 2.55.
Monitor Brightness and Contrast Often, the brightness control on a monitor is boosted to compensate for images that look dim due to a lack of gamma correction. Before applying gamma correction, the monitor brightness should be adjusted so a blank screen looks black in typical viewing conditions. Next, display a picture that is predominantly black, and adjust the brightness so that the monitor reproduces true black on the screen.
Use the following steps to fill in the "Create Action" form. 1. 2. 3. 4. Enter Gamma in the "Action Name" window. Enter /opt/graphics/common/bin/gamma in the "Command When Action is Opened" window. Click "Find Set..." and double click on the .dt/icons directory under your home directory. Select the "Gamma Icon" so your form appears as shown below: Figure 14: Create Action Form Page 121 Graphics Administration Guide for HP-UX 10.
Once you have filled in the "Create Actions" form, select "Save" from the File menu and follow these steps: 1. Click the Home Folder Icon on the CDE Front Panel, and click the up-arrow above the "Home Folder Icon" to display the sub-menu. Figure 15: Home folder icon 1. Home Folder Icon 2. Arrow for displaying the “Home Folder” sub-menu 2. Drag the Gamma Icon from File Manager onto "Install Icon". Figure 16: Install Icon Your "Home Folder" will should look similar to Figure 17.
Using the Gamma Correction Tool Figure 18: Gamma Correction Tool Gamma Value Slider The gamma value represents a power, so a value of 1.0 is the same as no gamma correction. Although the actual measured gamma value of most monitors is over 2.0, a gamma value of 1.7 is recommended since most applications have historically compensated for a lack of gamma correction by simply making the entire image brighter.
If the colormap used by the selected window is also used by other windows, their appearance will change along with the actual window you selected. If the only colormap used by the selected window is the default colormap, then you will need to check the "Modify Default Colormap" box as well. Modifying the default colormap will change the appearance of many windows and user-interface elements.
You can prevent this problem by changing with Shared Memory size through hp-UX's SAM (System Administration Manager) program. Reference Documentation You may find the following documentation helpful when using hp graphics products: • • • • • • • • • • • • • • • • • • • • For Starbase programming Starbase Reference Starbase Graphics Techniques hp-UX Starbase Device Drivers Manual Starbase Technical Addendum for hp-UX 10.
Appendix A: X Reference Page Synopsis The X Window System is a network-transparent window system developed at MIT which runs on a wide range of computing and graphics machines. It should be relatively straightforward to build the MIT software distribution on most ANSI C-compliant and POSIX-compliant systems. Commercial implementations are also available for a wide range of platforms.
and xprop), a diagnostic for seeing what events are generated and when (xev), screen image manipulation utilities (xwd, xwud, xpr, and xmag), and various demos (xeyes, ico, xgc, x11perf, etc.). Hewlett-Packard provides a graphical user environment called The Common Desktop Environment (CDE). hp CDE is the user interface, enabling the user to control a workstation by directly manipulating graphic objects instead of typing commands on a command-line prompt.
Display Names From the user's perspective, every X server has a display name of the form: hostname:displaynumber.screennumber This information is used by the application to determine how it should connect to the server and which screen it should use by default (on displays with multiple monitors): hostname The hostname specifies the name of the machine to which the display is physically connected.
hostname part of the display name is used to determine the type of channel (also called a transport layer) to be used. X servers generally support the following types of connections: local The hostname part of the display name should be the empty string. For example: ":0", ":1", or ":0.1". The most efficient local transport is chosen. TCP/IP The hostname part of the display name should be the server machine's IP address name. Full Internet names, abbreviated names, and IP addresses are all allowed.
Geometry Specifications One of the advantages of using window systems instead of hardwired terminals is that applications don't have to be restricted to a particular size or location on the screen.
Offsets must be given as pairs; in other words, in order to specify either xoff or yoff both must be present.
the server start up with all of the commonly used font directories in the font path, the font path can be changed at any time with the xset program. However, it is important to remember that the directory names are on the server's machine, not on the application's. Usually, fonts used by X servers and font servers can be found in subdirectories under /usr/lib/X11/fonts: /usr/lib/X11/fonts/iso_8859.1/75dpi This directory contains bitmap fonts contributed by Adobe Systems, Inc.
To convert one of the resulting names into a font at a specific size, replace one of the first two zeros with a nonzero value. The field containing the first zero is for the pixel size; replace it with a specific height in pixels to name a font at that size. Alternatively, the field containing the second zero is for the point size; replace it with a specific size in decipoints (there are 722.7 decipoints to the inch) to name a font at that size.
An RGB Device specification is identified by the prefix "rgb:" and has the following syntax: rgb:red/green/blue where red, green, and blue are encoded as h, hh, hhh, or hhhh, and h represents a single hexadecimal digit. ___________________________________________________________________________ Note: “h” indicates the value scaled in 4 bits; hh, the value scaled in 8 bits; hhh, the value scaled in 12 bits; and hhhh the value scaled in 16 bits, respectively.
The standard device-independent string specifications have the following syntax: CIEXYZ:X/Y/Z (none, 1, none) CIEuvY:u/v/Y ( .6, .6, 1) CIExyY:x/y/Y ( .75, .85, 1) CIELab:L/a/b (100, none, none) CIELuv:L/u/v (100, none, none) TekHVC:H/V/C (360, 100, 100) All of the values (C, H, V, X, Y, Z, a, b, u, v, y, x) are floating-point values. Some of the values are constrained to be between zero and some upper bound; the upper bounds are given in parentheses above.
Switching between groups is controlled by the keysym named "Mode Switch", by attaching that keysym to some key and attaching that key to any one of the modifiers Mod1 through Mod5. This modifier is called the group modifier. Group 1 is used when the group modifier is off, and Group 2 is used when the group modifier is on. Within a group, the modifier state determines which keysym to use. The first keysym is used when the Shift and Lock modifiers are off.
-selectionTimeout This option specifies the timeout in milliseconds within which two communicating applications must respond to one another for a selection request. -synchronous This option indicates that requests to the X server should be sent synchronously, instead of asynchronously. Since Xlib normally buffers requests to the server, errors do not necessarily get reported immediately after they occur. This option turns off the buffering so that the application can be debugged.
IncludeFile lines are interpreted by replacing the line with the contents of the specified file. The word "include" must be in lowercase. The filename is interpreted relative to the directory of the file in which the line occurs (for example, if the filename contains no directory or contains a relative directory specification). If a ResourceName contains a contiguous sequence of two or more Binding characters, the sequence will be replaced with single "." character if the sequence contains only ".
Programs based on the X Tookit Intrinsics obtain resources from the following sources (other programs usually support some subset of these sources): RESOURCE_MANAGER root window property Any global resources that should be available to clients on all machines should be stored in the RESOURCE_MANAGER property on the root window of the first screen using the xrdb program. This is frequently taken care of when the user starts X through the display manager.
By combining class and instance specifications, application preferences can be set quickly and easily. Users of color displays will frequently want to set Background and Foreground classes to particular defaults. Specific color instances such as text cursors can then be overridden without having to define all of the related resources.
Examples The following is a collection of sample command lines for some of the more frequently used commands. For more information on a particular command, please refer to that command's manual page. $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ xrdb $HOME/.Xdefaults xmodmap -e "keysym BackSpace = Delete" mkfontdir /usr/local/lib/X11/otherfonts xset fp+ /usr/local/lib/X11/otherfonts xmodmap $HOME/.keymap.km xsetroot -solid 'rgbi:.8/.8/.
See Also bdftopcf(1), bitmap(1), fs(1), hpterm(1) mkfontdir(1), mwm(1), xauth(1), xclock(1), xcmsdb(1), xfd(1), xhost(1), xinitcolor(1), xload(1), xlsfonts(1), xmodmap(1), xpr(1), xprop(1), xrdb(1), xrefresh(1), xset(1), xsetroot(1), xterm(1), xwd(1), xwininfo(1), xwud(1), Xserver(1), Xlib - C Language X Interface, and X Toolkit Intrinsics - C Language Interface.
Appendix B: X Server Reference Page Name X: X Window System server Synopsis :displaynumber [-option] Description "X" is the generic name for the window system server. It is started by the dtlogin program which is typically run by init(1M). Alternatively, it may be started from the xinit(1) program, which is called by x11start. The argument is used by clients in their DISPLAY environment variables to indicate which server to contact (machines may have several displays attached).
Options The following options can be given on the command line to the X server. -a Sets pointer acceleration (i.e., the ratio of how much is reported to how much the user actually moved the pointer). -audit Sets the audit trail level. The default level is 1, meaning only connection rejections are reported. Level 2 additionally reports all successful connections and disconnects.
-logo Turns on the X Window System logo display in the screen-saver. There is currently no way to change this from a client. You also need to specify -v to enable the logo to appear. nologo Turns off the X Window System logo display in the screen-saver. There is currently no way to change this from a client. -p Sets screen-saver pattern cycle time in minutes. -pn Allows X server to run even if one or more communications mechanisms fails to initialize.
You can also have the X server connect to xdm(1) or dtlogin(1X) using XDMCP. Although this is not typically useful as it doesn't allow xdm to manage the server process, it can be used to debug XDMCP implementations, and serves as a sample implementation of the server side of XDMCP. The following options control the behavior of XDMCP. -query host-name Enable XDMCP and send Query packets to the specified host. -broadcast Enable XDMCP and broadcast BroadcastQuery packets to the network.
Security File Format The syntax of the security policy file is as follows. Notation: "*" means zero or more occurrences of the preceding element, and "+" means one or more occurrences. To interpret xxx/yyy, ignore the text after the /; it is used to distinguish between instances of xxx in the next section.
lines are currently ignored. They are intended to specify the site policies used by the XCQUERY-SECURITY-1 authorization method. lines specify how the server should react to untrusted client requests that affect the X Window property named . The rest of this section describes the interpretation of an access rule. For an to apply to a given instance of , must be on a window that is in the set of windows specified by .
An applies to all that follow it, until the next is encountered. Thus, "irwad" means "ignore read and write, allow delete." GetProperty and RotateProperties may do multiple operations (r and d, or r and w). If different actions apply to the operations, the most severe action is applied to the whole request; there is no partial request execution.
# say "top level windows only." property WM_CLASS WM_NAME ar # These next three let xlsclients work untrusted. Think carefully # before including these; giving away the client machine name and command # may be exposing too much. property WM_STATE WM_NAME ar property WM_CLIENT_MACHINE WM_NAME ar property WM_COMMAND WM_NAME ar # To let untrusted clients use the standard colormaps created by # xstdcmap, include these lines.
Running From INIT Though X will usually be run by dtlogin from init, it is possible to run X directly from init. For information about running X from dtlogin, see the dtlogin man page. To run X directly from init, it is necessary to modify /etc/inittab and /etc/gettydefs. Detailed information on these files may be obtained from the inittab(4) and gettydefs(4) man pages.
page for a description of the binary format of this file. Maintenance of this file, and distribution of its contents to remote sites for use there is left as an exercise for the reader. The sample server also uses a host-based access control list for deciding whether or not to accept connections from clients on a particular machine. This list initially consists of the host on which the server is running as well as any machines listed in the file /etc/Xn.hosts, where n is the display number of the server.
Fonts Fonts are usually stored as individual files in directories. The list of directories in which the server looks when trying to open a font is controlled by the font path. Although most sites will choose to have the server start up with the appropriate font path (using the -fp option mentioned above), it can be overridden using the xset program.
Files /etc/inittab /etc/gettydefs /etc/X*.hosts /usr/lib/X11/fonts /usr/lib/X11/rgb.txt /usr/lib/X11/rgb.pag /usr/lib/X11/rgb.
See Also dtlogin(1), bdftopcf(1), fs(1), getty(1M), gettydefs(4), gwindstop(1), hpterm(1), init(1M), inittab(4), mkfontdir(1), rgb(1), stmkdirs(1), x11start(1), xauth(1) clock(1), xfd(1), xhost(1), xinit(1), xinitcolormap(1), xload(1), xmodmap(1), xrefresh(1), xseethru(1), xset(1), xsetroot(1), xterm(1), xwcreate(1), xwd(1), xwdestroy(1), xwininfo(1), xwud(1) Page 155 Graphics Administration Guide for HP-UX 10.
Appendix C: Low BandWidth X Proxy Name lbxproxy: Low BandWidth X proxy Synopsis lbxproxy [:] [
The lbxproxy program has various options, all of which are optional. If : is specified, the proxy will use the given display port when listening for connections. The display port is an offset from port 6000, identical to the way in which regular X display connections are specified. If no port is specified on the command line option, lbxproxy will default to port 63. If the port number that the proxy tries to listen on is in use, the proxy will attempt to use another port number.
-nogfx Disables reencoding of graphics requests (not including image-related requests). -noimage Disables image compression. -nosquish Disables squishing of X events. -nointernsc Disables short circuiting of InternAtom requests. -noatomsfile Disables reading of the atoms control file. See the section on "Atom Control" for more details. -atomsfile Overrides the default AtomControl file. See the section on "Atom Control" for more details.
Atom Control At startup, lbxproxy "pre-interns" a configurable list of atoms. This allows lbxproxy to intern a group of atoms in a single round trip and immediately store the results in its cache. While running, lbxproxy uses heuristics to decide when to delay sending window property data to the server. The heuristics depend on the size of the data, the name of the property, and whether a window manager is running through the same lbxproxy.
Appendix D: RX Netscape Navigator Plug-in Name libxrx: RX Netscape Navigator Plugin Description The RX Plugin may be used with Netscape Navigator (3.0 or later) to interpret documents in the RX MIME type format and start remote applications. The RX Plugin reads an RX document, from which it gets the list of services the application wants to use. Based on this information, the RX Plugin sets the various requested services, including creating authorization keys.
If you are already running Netscape Navigator, you need to exit and restart it after copying the plugin library so the new plugin will be found. Once this is done you can check that Navigator has successfully loaded the plugin by checking the About Plugins page from the Help menu. This should show something like: RX Plugin File name: /usr/local/lib/netscape/plugins/libxrx.6.
Environment If the RX document requests X-UI-LBX service and the default X server does not advertise the LBX extension, the RX Plugin will look for the environment variable XREALDISPLAY to get a second address for your X server and look for the LBX extension there. When running your browser through lbxproxy you will need to set XREALDISPLAY to the actual address of your server if you wish remote applications to be able to use LBX across the Internet.
Appendix E: Proxy Manager Service Name proxymngr: Proxy Manager Service Synopsis proxymngr [-config ] [-timeout ] [-retries <#>-verbose] Description The proxy manager (proxymngr) is responsible for resolving requests from xfindproxy (and other similar clients), starting new proxies when appropriate, and keeping track of all of the available proxy services. The proxy manager strives to reuse existing proxies whenever possible.
Proxy Manager Config File The proxy manager maintains a local configuration file describing the proxy services available. This configuration file is installed in /etc/X11/proxymngr/pmconfig during the installation of proxymngr. The location of the configuration file can be overwritten using the -config command line option. Aside from lines starting with an exclamation point for comments, each line of the configuration file describes either an unmanaged or managed proxy service.
Example Here is a sample configuration file: ! proxy manager config file ! ! Each line has the format: ! managed ! or ! unmanaged ! lbx managed /usr/bin/X11/lbxproxy -display dispName:0.0 :1 ! Proxy Manager Details When the proxy manager gets a request from xfindproxy (or another similar client), its course of action will depend on the in question. For a managed proxy service, the proxy manager will find out if any of the already running proxies for this service can handle a new request.
Origin The Open Group See Also xfindproxy(1), lbxproxy(1) Page 166 Graphics Administration Guide for HP-UX 10.
Appendix F: Locate Proxy Services Name xfindproxy: Locate Proxy Services Synopsis xfindproxy -manager -name -server [-auth] [-host ] [-options ] Description xfindproxy is a program used to locate available proxy services. It utilizes the Proxy Management Protocol to communicate with a proxy manager.
If xfindproxy is successful in obtaining a proxy address, it will print it to stdout. The format of the proxy address is specific to the proxy service being used. For example, for a proxy service of "LBX", the proxy address would be the X display address of the proxy (e.g, "info.x.org:63"). If xfindproxy is unsuccessful in obtaining a proxy address, it will print an error to stderr. Origin The Open Group See Also proxymngr(1), lbxproxy(1) Page 168 Graphics Administration Guide for HP-UX 10.
Appendix G: RX Helper Program Name xrx: RX Helper Program Synopsis xrx [- . . .] Description The helper program may be used with any Web browser to interpret documents in the RX MIME type format and start remote applications. xrx reads in the RX document specified by its , from which it gets the list of services the application wants to use.
Options The xrx helper program accepts all of the standard X Toolkit command line options such as: -xrm This option specifies a resource string to be used. There may be several instances of this option on the command line. Resources The application class name of the program is Xrx and it understands the following application resource names and classes: xrxFastWebServers (class XrxFastWebServers) The web servers for which LBX should not be used.
then tries to use the video server as the print server. If the printer name is not specified via XPRINTER, looks for it in the variables PDPRINTER, then LPDEST, and finally PRINTER, Notes When an authorization key is created for a remote application to use the X Print service, the helper program has to create the key with an infinite timeout since nobody knows when the application will actually connect to the X Print server.