XINIT(1)

NAME
xmxinit - X multiplexor initializer

SYNOPSIS
xmxinit [ [ client ] options ] [ -- [ multiplexor ] [ display ] options ]

DESCRIPTION
The xmxinit program is used to start an X multiplexor and a first client program. When this first client exits, xmxinit will kill the X multiplexor and then terminate.

If no specific client program is given on the command line, xmxinit will look for a file in the user's home directory called .xmxinitrc to run as a shell script to start up client programs. If no such file exists, xinit will use the following as a default:

    xterm -geometry +1+1 -n login -display :0

If no specific multiplexor program is given on the command line, xmxinit will look for a file in the user's home directory called .xmxserverrc to run as a shell script to start up the multiplexor. If no such file exists, xmxinit uses the executable named by the XMX environment variable. If it is not set, xmxinit will use the following as a default:

    xmx :1

Note that this assumes that there is a program named xmx in the current search path.

An important point is that programs which are run by .xmxinitrc should be run in the background if they do not exit right away, so that they don't prevent other programs from starting up. However, the last long-lived program started (usually a window manager or terminal emulator) should be left in the foreground so that the script won't exit (which indicates that the user is done and that xmxinit should exit).

An alternate client and/or multiplexor may be specified on the command line. The desired client program and its arguments should be given as the first command line arguments to xmxinit. To specify a particular multiplexor command line, append a double dash (--) to the xmxinit command line (after any client and arguments) followed by the desired multiplexor command.

Both the client program name and the multiplexor program name must begin with a slash (/) or a period (.). Otherwise, they are treated as arguments to be appended to their respective startup lines. This makes it possible to add arguments (for example, foreground and background colors) without having to retype the whole command line.

If an explicit multiplexor name is not given and the first argument following the double dash (--) is a colon followed by a digit, xmxinit will use that number as the display number instead of one. All remaining arguments are appended to the multiplexor command line.

EXAMPLES
Below are several examples of how command line arguments in xmxinit are used.

xmxinit
    This will start up a multiplexor named xmx and run the user's .xmxinitrc, if it exists, or else start an xterm.

xmxinit -- /usr/local/bin/xmx2 :1
    This is how one could start a specific type of multiplexor on an alternate display.

xmxinit -geometry =80x65+10+10 -fn 8x13 -j -fg white -bg navy
    This will start up a multiplexor named xmx, and will append the given arguments to the default xterm command. It will ignore .xmxinitrc.

xmxinit -e widgets -- ./xmx -debug pn
    This will use the command .xmx -debug pn to start the multiplexor and will append the arguments -e widgets to the default xterm command.

xmxinit /usr/ucb/rsh fasthost cpupig -display ws:1 --  :1 -a 2 -t 5
    This will start a multiplexor named xmx on display 1 with the arguments -a 2 -t 5. It will then start a remote shell on the machine fasthost in which it will run the command cpupig, telling it to display back on the local workstation.

Below is a sample .xmxinitrc that starts a clock, a terminal, a multiplexor session manager, and leaves the window manager running as the ``last'' application. Assuming that the window manager has been configured properly, the user then chooses the ``Exit'' menu item to shut down the session.

xrdb -load $HOME/.Xresources
xsetroot -solid gray &
xclock -g 50x50-0+0 -bw 0 &
xmtg -g +0+0 &
xterm -g 80x24+0-0 &
twm

ENVIRONMENT VARIABLES

DISPLAY
    This variable gets set to the name of the display to which clients should connect.

XMX This variable specifies the name of the X multiplexor to invoke, if none is specified on the command line. The default value is ``xmx''.

XMXINITRC
    This variable specifies an init file containing shell commands to start up the initial windows. By default, .xmxinitrc in the home directory will be used.

FILES

.xmxinitrc
    default client script

xterm
    client to run if .xmxinitrc does not exist

.xmxserverrc
    default multiplexor script

xmx multiplexor to run if .xmxserverrc does not exist

SEE ALSO
X(1), xmx(1), Xserver(1), xterm(1)

COPYRIGHT
Copyright 1988, Massachusetts Institute of Technology.
See X(1) for a full statement of rights and permissions.

AUTHOR
Bob Scheifler, MIT Laboratory for Computer Science
Modified from xinit source by John Bazik, Brown Univ Dept of Computer Science