Back to Sections 9.2.2 through 9.2.2.129.2.3 The X Server Program9.3 CodeBuilder X Window Software Overview9.2.3.1 X Server Start Up Options9.2.4 X Display Management Under CodeBuilder
9.2.3.2 Mouse Button Mapping
9.2.3.3 Keyboard Mapping
9.2.3.4 Server Error Logging
9.2.3.5 X Server Performance Tuning Guide
9.2.3.6 The Default Font Path9.3.1 Preparing Your Macintosh Control Panels9.4 X Window Software Frequently Asked Questions
9.3.2 Getting Started With X
9.3.3 Building X Applications9.3.3.1 Running X Client Applications
9.3.3.2 The X11 Application Development Environment Under CodeBuilder
9.3.3.3 Programming Notes
-auth authorization-file
| Specifies a file which contains a collection of authorization records
used to authenticate access. See also the xdm and Xsecurity
manual pages. |
bc | Disables certain kinds of error checking, for bug compatibility with
previous releases (e.g., to work around bugs in R2 and R3 xterms
and toolkits). |
-bs | Disables backing store support on all screens. |
-co filename | Sets name of RGB color database. |
-dpi resolution | Sets the resolution of the screen, in dots per inch. To be used
when the server cannot determine the screen size from the hardware. |
-fc cursorFont | Sets the default cursor font. |
-fn font | Sets the default font. |
-fp fontPath | Sets the search path for fonts. This path is a comma separated list
of directories which the X server searches for font databases. |
-fs | Starts the server in full screen mode. In this mode, the Macintosh menu
bar is hidden by the X desktop. Pull-down menus from the Macintosh menu
bar remain accessible by pressing the mouse button while dragging the cursor
along the top edge of the desktop. This option may not work on PCI Macintosh systems. |
-help | Prints a usage message. |
-I | Causes all remaining command line arguments to be ignored. |
-ld kilobytes | Sets the data space limit of the server to the specified number of kilobytes.
A value of zero makes the data size as large as possible. The default value
of -1 leaves the data space limit unchanged. |
-ls kilobytes | Sets the stack space limit of the server to the specified number of
kilobytes. A value of zero makes the stack size as large as possible. The
default value of -1 leaves the stack space limit unchanged. |
-mbm middle-key | Changes the middle mouse button keystroke mapping. The key entered as
a decimal value representing the Macintosh virtual key code corresponding
to the desired key. Allowable values are between 0 and 127. Refer to section
"9.2.3.2 Mouse Button Mapping" for a table of keys and virtual
key codes. |
-mbr right-key | Changes the right mouse button keystroke mapping. |
-menu | Starts the server in dedicated full screen mode. In this mode,
the Macintosh menu bar is hidden by the X desktop and access to Macintosh
pull-down menus is completely disabled. The xtmenu(n) program, run from your X window manager menu environment, may be used to temporarily restore access to your Macintosh desktop. Caution: this option locks out access to Finder and other running Macintosh applications! |
-mo | Specifies that the Macintosh Option key will be used in combination
with the mouse button keystroke to simulate the middle or right mouse button.
When used without the -mbm or -mbr start up options, the
default middle and right mouse button keystrokes become <Option-left
arrow> and <Option-right arrow>, respectively. Selecting this option
causes all arrow keys, including the Up and Down arrows, to function normally. |
-static | Runs the server in StaticColor mode, preventing X client modification
of the Macintosh color table. |
-su | Disables save under support on all screens. |
-to seconds | Sets the default connection time-out in seconds. |
-wm | Forces the default backing-store of all windows to be WhenMapped; an
easy way of getting backing-store to apply to all windows. This option can
be useful when displaying X applications over slow serial links. |
Key | Value | Key | Value |
F1 | 122 | Help | 114 |
F2 | 120 | Home | 115 |
F3 | 99 | Page up | 116 |
F4 | 118 | Page up | 116 |
F5 | 96 | Page down | 121 |
F6 | 97 | End | 119 |
F7 | 98 | Left arrow | 123 |
F8 | 100 | Right arrow | 124 |
F9 | 101 | Down arrow | 125 |
F10 | 109 | Up arrow | 126 |
F11 | 103 | Clear | 71 |
F12 | 111 | Equal | 81 |
F13 | 105 | | |
F14 | 107 | | |
F15 | 113 | | |
The X server may also be configured to accept the Macintosh Option
key in combination with the selected button keystroke using the -mo
start up parameter described in the previous section. This allows keyboard
keys to function both as normal keys and, when the Option key is
pressed, as mouse buttons.
If the default mouse button configuration is modified or you use the Macintosh
Option key in combination with another key to simulate a mouse
button, all arrow keys revert to their original functions.
Example Three Button Mouse Configuration. Suppose
you own a Logitech Mouse and would like to map the middle and right mouse
buttons to the <Option-F14> and <Option-F15> key combinations
when running the CodeBuilder X server. Your Logitech MouseMan Control Panel
would look something like this:
-mo -mbm 107 -mbr 113 -cmdkey meta
DE | Germany |
DK | Denmark |
ES | Spain |
FI | Finland |
FR | France |
GB | Great Britain |
IT | Italy |
NO | Norway |
PT | Portugal |
SE | Sweden |
FC | French Canadian |
CA | Canada |
To change the X default U.S. keyboard layout, enter the following from a CodeBuilder terminal window prior to starting the X server for the first time:
This command creates an Xmodmap link file to your country's X key map. The Xmodmap file will be read into the server by xmodmap each time the server starts up via the xinitrc file. To restore the X key map to the default U.S layout, delete the link file and restart the X server.ln /usr/lib/X11/xinit/Xmodmap-XX/usr/lib/X11/xinit/Xmodmap
With the symbolic link in place, errors logged by the X server will appear in the CodeBuilder console window.ln /dev/console /var/adm/X0msgs
/usr/X11/lib/X11/fonts/misc | This directory contains many miscellaneous bitmap fonts that are
useful on all systems. It contains a family of fixed-width fonts, several
Kana fonts from Sony Corporation, two JIS Kanji fonts, two Hangul fonts
from Daewoo Electronics, two Hebrew fonts, the standard cursor font, two
cursor fonts from Digital Equipment Corporation, and cursor and glyph fonts
from Sun Microsystems. It also has various font name aliases for the fonts,
including fixed and variable. |
/usr/X11/lib/X11/fonts/Speedo | This directory contains outline fonts for Bitstream, Inc.'s Speedo
rasterizer. A single font face, in normal, bold, italic, and bold italic,
is provided. |
//usr/X11/lib/X11/fonts/75dpi | This directory contains bitmap fonts contributed by Adobe Systems,
Inc., Digital Equipment Corporation, Bitstream, Inc., Bigelow and Holmes,
and Sun Microsystems, Inc. for 75 dots per inch displays. An integrated
selection of sizes, styles, and weights are provided for each family. |
//usr/X11/lib/X11/fonts/100dpi | This directory contains 100 dots per inch versions of some of the fonts in the 75dpi directory. |
Font databases are created by running the mkfontdir(n) program
in the directory containing the compiled versions of the fonts (the .pcf
files). Whenever fonts are added to a directory, mkfontdir should
be rerun so that the server can find the new fonts. If mkfontdir
is not run, the server will not be able to find any fonts in the directory.
XMachTen | The CodeBuilder X Window Server |
olvwm | The OpenLook Window Manager and user environment |
fonts | X11 fonts in Portable Compiled Format and a network font server |
The main client development and run-time library components provided
are:
X | The X11 library containing the core of the X protocol |
Xt | The X Intrinsics toolkit library |
Xaw | The Athena Widget set of buttons, pull-down menus, labels, etc. |
Xmu | The X Miscellaneous Utility used by the Athena widget set |
Xau | The library supporting a security authorization for client/server
connections |
Xext | The library supporting the Shape, Multi-buffering and MIT-misc.
extensions |
Xi | The library of the Input extension to the protocol supporting alternative
input devices |
Xview | The Xview widget library |
Olgx | The OpenLook graphics library |
Phigs | The Application Protocol Interface library supporting the creation
of PEX protocol, version 5.1 |
PEX5 | The Xlib-level C interface library to the PEX protocol, version
5.1 |
Xdmcp | The library of X Display Manager Control Protocol routines |
Imake | The configuration system for generating Makefiles |
Clients | A source distribution of MIT client and demonstration programs |
The software in this release is contained on CD-ROM. When installed,
the X11 software will reside in the following directories after the installation:
/usr/X11/lib | X11 library archive files (libX*.a) |
/usr/X11/lib/X11 | X11 configuration files, fonts and application default resource
files |
/usr/X11/bin | X11 executable files |
/usr/include/X11 | X11 include files for application development |
/usr/X11/mann | X11 manual pages |
/usr/include/Xview | include files for OpenLook application development |
mkdir /base/macppc/X11 cd /base/macppc/X11 lndir /base/src/X11
cd /base/macppc/src/X11/R6/mit/clients/xlogo xmkmf make
make install
make install.man
To build the entire X client suite, follow these additional steps:make clean
cd /base/macppc/X11/R6/mit/clients xmkmf
Compiler warning messages are expected from some clients in the MIT distribution. These warnings will not adversely affect the client's operation under CodeBuilder.then follow steps 3 through 5, above.make Makefiles make
/usr/X11/bin/xlogo &
To increase the application stack size by 100K bytes, use the command:#ifdef MachTenPPCArchitecture LOCAL_LDFLAGS = -Xlstack=<stacksize> #endif
Refer to Section 8.0 CodeBuilder Programming Environment further information on programming under CodeBuilder.LOCAL_LDFLAGS = -Xlstack=100000
You must be running wind(8) when you start the X server. Log into an account under CodeBuilder and be certain the wind process is running before launching the X server.
The X server depends on /usr/X11/bin/ present in your directory search path. Under CodeBuilder for the PowerPC, /usr/bin/X11 is soft linked to /usr/X11/bin. XMachTen, the X server binary, and all server support applications reside in this directory. If you are running a custom shell (e.g., zsh or ksh), make certain your X11 search path is set up before you start the wind process. The sample .login and .profile files in /usr/share/skel show examples of adding to your search path to include /usr/X11/bin.
You may have accidently installed the X software on a target volume other than the volume containing your CodeBuilder folders.
You may have moved your CodeBuilder folders to a subfolder on the target volume prior to installing the X Window Software. Use Finder to temporarily relocate the CodeBuilder folder to the top level of the target volume before installing the X software.
Read section "9.3.1 Preparing Your Macintosh Control Panels".
The log files /var/adm/X0msgs and /var/tmp/startXmsgs'do not exist or have the wrong permissions. The following commands illustrate how to create and set the proper permissions:
The X server maintains a log file in /var/adm/X0msgs. Consult this file if you have difficulties starting or operating the X server. You can redirect entries logged to this file to the CodeBuilder Console terminal window using the command:cp /dev/null /var/tmp/X0msgs chmod 666 /var/tmp/X0msgs
ln /dev/console /var/adm/X0msgs
By default, the X server uses the left-arrow for mouse button two, the right-arrow for mouse button three, the down arrow as a Control key, and the up arrow as a Meta key. When the Option key is pressed with an arrow key, the arrow key's original function is temporarily restored. When you re-map mouse button keys two and three in your .xserverrc file, all arrow keys' original functions are permanently restored. You may also use the -mo server start up option to restore normal functionality to your arrow keys.
Refer to section "9.2.3.2 Mouse Button Mapping" and the example in the sample X server start up file /usr/X11/lib/X11/xinit/xserverrc.
Both the Logitech MouseMan and the MouseSystems A/3 Optical Mouse have been tested successfully with the X server.
When the X desktop is visible, X client applications have precedence over the MacOS when competing for the limited number of colors that can be displayed simultaneously. The menu bar is drawn by the MacOS based on the best matching colors available.
Consider running the X server with no Macintosh menu bar as described in section "9.2.3.1 X Server Start Up Options".
Make certain that either the /usr/bin/X11 or /usr/X11/bin directory is in your directory search path.
You must load a French keyboard mapping file when the X server is launched to re-map the default U.S. X keyboard map. Refer to section "9.2.3.3 Keyboard Mapping".
The X server has a local database which takes precedence over the .Xdefaults file. This database originates from a previous running of the xrdb(n) program with the -load or -merge options.
You can force your .Xdefaults file to be read by the application by defining the XENVIRONMENT shell variable:
Resources defined via XENVIRONMENT override duplicate resources contained in the X server's database.setenv XENVIRONMENT .Xdefaults
Alternatively, the .Xdefaults file is read if the database is removed from the server:
xrdb -remove
The X server takes advantage of the Macintosh firmware cursor for maximum performance and a lively tactile response. The Macintosh cursor is limited to a fixed 16 x 16 pixel size, so when an application tries to display a cursor larger than 16 x 16 pixels, the server substitutes a standard arrow cursor. The X server currently does not support color cursors with this Macintosh cursor.
Both of these problems can be avoided by using the "-swc" flag with the X server.
If you have a color monitor, you can specify a custom foreground and background color for your application using the -fg and -bg command line options. For example:
Alternatively, you can copy the default application resource file (for example, XLogo) from /usr/X11/lib/X11/app-defaults (if present) for the program you are running to your home directory and modify it to suit your tastes:xlogo -bg yellow -fg green &
Refer to the manual page for the client you are running for a description of the color resources available to the application.XLogo*background: green XLogo*foreground: yellow
Note that command line options take precedence over resource definitions.
A directory of contributed (and unsupported) X client applications in CodeBuilder executable format is maintained on Internet host ftp.tenon.com in the /pub/applications/X11 directory.
The application has a fixed 36KB stack size when operating in a real memory environment (unix) and may require more stack space in order to run. Increase the program's stack allocation using the example in section "9.3.3.3 Programming Notes".
The MacOS reserves all Command-Shift-number keystroke combinations for special effects. Since the default X Meta key is the Command key, the Meta-Shift-number key sequence is not delivered to the X client. Use the xmodmap(n) utility to re-map Meta to something other than the Command key.