Unsupported Applications
The following are some applications and libraries, all of which are available from the X Consortium, that run on the server but are not distributed or supported by Sun:
Andrew, InterViews
The uwm and wm window managers
The CLX Common Lisp interface
contrib X Consortium clients
OpenWindows Directory Structure
The OpenWindows directory structure, which includes the Solaris X server executable and X11 core distribution libraries, is shown in Figure 1-3. Note that /openwin/etc is a symbolic link to /openwin/share/etc, /openwin/include is a link to /openwin/share/include, and /openwin/man is a link to /openwin/share/man. The /share directory contains architecture-independent files.
For more information on the X11 libraries in /openwin/lib, see "X11 Libraries".
Figure 1-3 OpenWindows Directory Structure
Table 1-2 briefly describes the contents of the top level directories in the OpenWindows directory structure.
Table 1-2 OpenWindows Directories
Directory | Subdirectory | Content |
---|---|---|
/etc | /keytables | US and international keytables, and keytable.map |
| /tt | ToolTalk® data files |
| /workspace | /patterns (.xbm files and attributes) |
/include | /X11 | X11 header files, /DPS, /Xaw, /Xmu, /bitmaps, /extensions |
| /Xau | Symbolic link to /include/X11 |
| /Xol | OLIT header files |
| /config | generic.h header file |
| /desktop | Classing engine header files |
| /dga | dga.h header file |
| /help | libhelp header files |
| /images | Various bitmap files |
| /olgx | olgx header file |
| /pixrect | Pixrect header files |
| /portable | c_varieties.h and portable.h header files |
| /xview | XView header files |
/lib | /X11 | Server support files, /fonts, and DPS .upr files |
| /Xol | OLIT data files |
| /app-defaults | X applications default files |
| /cetables | Classing Engine tables |
| /config | imake files |
| /help | Symbolic link to /locale/C/help |
| /libp | Profiles libraries |
| /locale | Locale libraries (/C, /iso_8859_1) |
| /xdm | Xdm configuration files |
| /sparcv9 | 64-bit X libraries |
/man | /man1, /man1m | OpenWindows command man pages |
| /man3 | Library man pages, for XView, OLIT, Xt, Xlib, etc. |
| /man4 | AnswerBook man pages |
| /man5 | File format man pages |
| /man6 | Demos man pages |
| /man7 | Non-command man pages |
/server | Server private files for internal use only | |
/share | /etc | Location of files in /etc |
| /images | /PostScript, /fish, /raster |
| /include | Location of files in /include |
| /locale | Location of files in /lib/locale |
| /man | Location of files in /man |
| /src | /dig_samples, /extensions, /fonts, /olit, /tooltalk, /xview |
| /xnews | /client |
Notes on X11 Programming
Common X11 programming issues are discussed in the following sections.
Compose Key Support
The OpenWindows version of Xlib supports Compose Key processing through calls to XLookupString.
IA only - On IA keyboards, use the Control-Shift-F1 key sequence for the Compose Key functionality.
NumLock Key Support
The OpenWindows version of Xlib supports NumLock Key processing through calls to XLookupString. This change does not affect the NumLock processing that exists in XView, OLIT, Motif, or X applications.
IA only - On IA keyboards, the NumLock Key resides in the top line of the keypad section of the keyboard.
Color Name Database
The color name database provides a mapping between ASCII color names and RGB color values. This mapping increases the portability of color programs and eases programming. Note that this mapping is subjective and has no objective scientific basis.
The source of the database is /usr/openwin/lib/X11/rgb.txt. This file is identical to the one provided in X11R6 from the X Consortium. rgb.txt is compiled into the dbm(3) database files, rgb.dir and rgb.pag. When the server starts up, it builds an internal representation of rgb.dir and rgb.pag used to map a color name to a color value.
X11 clients use XLookupColor or XAllocNamedColor to map a color name to a color value. The color name string passed to these routines is converted to lowercase before it is looked up in the database.
Color Recommendations
This section contains recommendations for using the Solaris X server color support facilities. Use these hints to maximize portability and color sharing:
Do not rely on the locations of black and white in the default PseudoColor colormap. Always use XAllocColor to allocate a pixel for rendering.
Note - Do not rely on black and white being in certain pixel locations. Future versions of the Solaris X server and the servers of other vendors may have these colors located in different positions than the current server. For maximum portability and compatibility, always write X11 clients so that they use the XAllocColor function to allocate desired colors for rendering.
Do not use a visual before you have checked on all supported visual types, using XGetVisualInfo or XMatchVisualInfo. Note that XGetVisualInfo is the recommended function to use because it has the ability to distinguish between visuals of the same class and depth.
To reduce colormap flashing, it is usually a good policy to try to first allocate colors from the default colormap. Only when this allocation fails should you create a private colormap.
For more hints on writing portable X11 color clients, see "Hints for Windows Programming With Visuals".
Further Reading
There are numerous books on all aspects of X and the X Window System. For more information on the X Window System, see "Related Books"of the preface for a list of recommended books available through SunExpress and your local book store. For more information on the Solaris X server and the X Consortium sample server, see the following manual pages:
Xsun(1) - Solaris X server
Xserver(1) - the X Consortium sample server
openwin(1) - OpenWindows startup command