XMACHTEN(n) MachTen Programmer’s Manual XMACHTEN(n)

NAME
XMachTen - MachTen Server for X Version 11, Release 6

DESCRIPTION
XMachTen is the server for Version 11, Release 6 of the X
window system on Macintosh hardware running MachTen or
XTen. MachTen and XTen are different products (from Tenon
Intersystems) that contain separate but similar distribu-
tions of X software. XMachTen is often refered to as the
"MachTen X Server", although these references could
equally apply to XTen. XMachTen is designed to take full
advantage of the MachTen or XTen environment to achieve
the highest possible X windows performance on the Macin-
tosh.

The startup of XMachTen is achieved via different means on
MachTen and XTen. Each of these startup methods is
described below. Once XMachTen is started, its behaviour
is consistent in both environments.

STARTUP UNDER MACHTEN
In MachTen, XMachTen runs under wind(8), the MachTen win-
dow daemon. Pressing the <apple-T> hot key sequence while
in the MachTen wind environment will initiate the X Server
and start a group of X client applications as defined in
the .xinitrc shell script file in the user’s home direc-
tory. The server may be run automatically upon wind
startup by placing a line containing a single character
"x" in the $HOME/.windrc file. This line should appear
after other MachTen terminal definitions, if any.

When started, the X Server becomes another, albeit spe-
cial, terminal window under wind. When in the foreground,
the X Server window occupies the full Macintosh screen and
becomes the user’s X11 root window or desktop. All X11
clients directed at the server are displayed on the X11
desktop.

The X Server window can be completely hidden from view by
selecting or creating another MachTen terminal window
under wind. Other Macintosh applications may be brought
into the foreground via MultiFinder to hide the X Server.
While hidden, all X client applications displayed on the
server continue to run but are obscured from view. All
other MachTen, Finder, and Macintosh application services
are similarly available while the X Server is running.
When MachTen is made the foreground application, the X
Server root window will reappear according to its stacking
order among other MachTen terminal windows, if any.
MachTen window stacking order is controlled via the
MachTen "Window" menu item.

If no other MachTen terminal windows are started along
with the X Server, an xterm console terminal should be
among the X client applications launched to display con-
sole output.

SHUTDOWN UNDER MACHTEN
Receipt of the SIGINT, SIGTERM, or SIGHUP signal will shut
down the MachTen X server. Also, the server may be shut
down by selecting the "Close Window" File menu item. All
active X clients are notified when the X Server is shut
down.

STARTUP UNDER XTEN
In XTen, XMachTen is launched by init(8), the system
startup daemon. XTen may be configured to launch XMachTen
via xdm, in which case a specific user login and password
is required, or via xinit, in which case a login and pass-
word is not required. Xinit and xdm follow their usual
sequences to start a group of X client applications as
defined in the

The X Server is the only windowing system available with
XTen. When XTen is in the foreground, the X Server window
occupies the full Macintosh screen and becomes the user’s
X11 root window or desktop. All X11 clients directed at
the server are displayed on the X11 desktop.

The X Server window can be completely hidden from view by
bringing other Macintosh applications into the foreground.
These applications may be selected via MultiFinder (if the
"enable Macintosh Menu Bar" option is specified when
XMachTen is launched). The X Server window can also be
hidden using the XTen Manager or the "Hide XTen" item in
the X Window Manager’s Root Menu. This exposes the Macin-
tosh application "Finder". While hidden, all X client
applications displayed on the server continue to run but
are obscured from view. All other Macintosh application
services are available while the X Server is running.
When XTen is again made the foreground application, the X
Server root window will reappear.

SHUTDOWN UNDER XTEN
Like standard X11 servers, the MachTen X Server catches
signals that attempt to restart or shut down the server.
The server may also be shutdown by quitting the X client
session started by either xinit or xdm. Also, the XTen
Manager may be used to quit XTen, thus shutting down the X
Server. All active X clients are notified when the X
Server is shut down.

RESTARTING XMACHTEN AND XTEN
Receipt of a SIGUSR2 signal causes the server to close all
existing connections, free all resources, and restore all
defaults.

CONFIGURATIONS
XMachTen operates under MachTen Release 4.0.2 and later,
or XTen 6.0 or later. At least eight (8) megabytes of
physical system memory with either Mac OS or MachTen vir-
tual memory active is recommended.

OPTIONS
Options available to the MachTen X Server are described in
Xserver(n). The .xserverrc file in the user’s home direc-
tory is used to start the X Server with options. By
default, the X server is started with no options. The
file /usr/lib/X11/xinit/xserverrc is an example X Server
startup file using server options.

THE MENU BAR
The X server is controlled relative to other MachTen win-
dows and Macintosh applications via the Macintosh menu bar
appearing over the X desktop. The menu bar may be hidden
from view when the X desktop is visible via the -fs or
-menu server start up options. Menu bar functions that
hide, show, or shut down the X server may be performed
using the xtmenu(n) utility application.

BUTTON MAPPINGS
Many X clients assume the mouse has three buttons. The
MachTen X Server simulates the middle and right mouse but-
tons with keystrokes -- by default the left-arrow key gen-
erates middle button events and the right-arrow key gener-
ates right button events -- the real mouse button gener-
ates left button events. The open-apple or cloverleaf key
is the "Meta" modifier; Meta can also be obtained by
pressing the up-arrow key. The down-arrow key duplicates
the Control key. Meta, Control, and Shift are often used
in combination with other keystrokes or mouse clicks. For
example, the terminal emulator xterm pops up menus in
response to control-middle and control-right. The normal
function of the arrow keys may be obtained by holding down
the Option key while pressing one of the arrow keys.

The default keystrokes for the middle and right mouse but-
tons may be changed via the -mbm and -mbr server start up
parameters. Mouse button keystrokes may also be combined
with the Macintosh Option key via the -mo start up parame-
ter. Use of these server options will cause all arrow
keys to function normally.

KEYBOARD MAPPINGS
The default layout for keybord keys in the MachTen X
Server corresponds to the U.S. character set under Mac OS.
Special characters and symbols, including characters with
diacritical marks, are available by pressing the option
key in combination with certain letter and number keys.
Refer to the Macintosh User’s Guide for more information
on typing special characters.

For International keyboard layouts, the xmodmap program is
used to re-map the U.S. character set for use in other
countries by reading conversion files found in
/usr/lib/X11/xinit. By way of example, to change the X
server keyboard layout from the default U.S layout to the
French layout, copy the Xmodmap-FR conversion file to a
file called .Xmodmap in /usr/lib/X11/xinit before starting
the X server for the first time. The .xinitrc script will
invoke xmodmap upon server startup and use the .Xmodmap
file to establish the desired keyboard layout.

Under the MachTen X Server, hot key operation (using the
apple cloverleaf key) normally associated with a MachTen
terminal window is disabled. The key functions as an X
Meta (or when shifted, Alt) key when the X Server is the
front window.

SECURITY
XMachTen uses an access control list for deciding whether
or not to accept a connection from a given client. This
list initially consists of the machine on which the server
is running, and any hosts listed in the file
/etc/X0.hosts. This file should contain one line per host
name, with no white space.

The user can manipulate a dynamic form of the access con-
trol list in the server using the xhost(n) program from
the same machine as the server.

Unlike some window systems, X does not have any notion of
window operation permissions or place any restrictions on
what a client can do; if a program can connect to a dis-
play, it has full run of the screen. There is support for
using authentication services on connection startup beyond
the simple host name check, but it is not used in the
standard distribution.

The MachTen X Server also supports a user-based access
control mechanism known as MIT-MAGIC-COOKIE-1. The X
Server may be started with options to communicate with an
X display manager via XDMCP to implement this access mech-
anism.

FONTS
Fonts are stored in individual files in the directory(ies)
named by the font search path. The name of the file cor-
responds to the name of the font in lowercase with the
suffix ".pcf" (Portable Compiled Font), ".snf" (Server
Natural Font), or ".spd" (Speedo-Bitstream) appended.
MachTen X Server fonts are provided in ".pcf" format.
Font files may be stored in compress(1) format, in which
case an additional suffix ".Z" must be appended to the
usual filename. Fonts may also be accessed via a remote
font server by specifying the -fp option when when server
is started.

The MachTen X Server distribution includes an executable
font server. See xfs(n).

FILES
$HOME/.xinitrc Bourne shell script executed
by xinit client which starts
a number of other clients.
If no .xinitrc file exists,
the file
/usr/lib/X11/xinit/xinitrc
is executed. If this file
does not exist, a single
xterm client is started.

/usr/bin/X11/XMachTen The MachTen X Server binary
executable image.

$HOME/.xserverrc A Bourne shell script exe-
cuted by xinit to start the
X server with user specified
options. An example script
is in
/usr/lib/X11/xinit/xserverrc.

/usr/bin/X11/* X client binary images.

/usr/lib/X11/fonts/* Local font files.

/usr/lib/X11/xinit/Xmodmap-XX International keyboard map-
ping files. The two charac-
ter suffix is the country
code.

/usr/lib/X11/rgb.{dir,pag,txt}
Color names to RGB mapping.

/etc/X0.hosts Initial access control list.
X applications launched from
hosts listed in this file,
in addition to the local
host, are allowed access to
the X Server.

/tmp/.X11-unix/X0 Unix domain socket.

/usr/adm/X0msgs X Server Error log file.
Start up failure and unex-
pected termination messages
are logged to this file.

/usr/lib/X11/app-defaults Directory containing appli-
cation specific class
resource files. The default
appearances of the olvwm and
mwm window managers are
taken from specifications in
this directory.

$HOME/.Xdefaults User environment resource
file. Resource specifica-
tions in this file are
merged with and take prece-
dence over resources speci-
fied in /usr/lib/X11/app-
defaults.

NOTES
Mouse acceleration and auto repeat functionality are con-
trolled by the Macintosh Mouse and Keyboard Control Pan-
els, respectively. X client requests to manipulate these
features are ignored by the X Server.

X client screen saver X11 protocol requests are ignored by
the X Server.

The X Server supports only the main screen in a multi-
screen environment.

SEE ALSO
Xserver(n), xinit(n), xtmenu(n), xhost(n), xmodmap(n),
wind(8)

X Version 11 Release 6 5