Initializes the X Window System.
xinit [ [ Client ] Options ] [ - - [ Server ] [ Display ] Options ]
The xinit command starts the AIXwindows server and a first client program on systems that cannot start X directly from /etc/init or in environments that use multiple window systems. When this first client exits, the xinit command stops the X server and then ends.
If no specific client program is given on the command line, the xinit command looks for a file to run to start up client programs. The xinit command looks for the $XINITRC environment variable. If the file is not there, it then looks for the $HOME/.xinitrc file. If it still does not find the file, it follows these steps:
If no such file exists, xinit uses the following as a default:
aixterm \-geometry +1+1 \-n login \-display :0
If no specific server program is given on the command line, the xinit command follows these steps:
X :0
Note that this assumes that there is a program named X in the current search path. However, servers are usually named Xdisplaytype where displaytype is the type of graphics display which is driven by this server. The site administrator should, therefore, make a link to the appropriate type of server on the machine, or create a shell script that runs the xinit command with the appropriate server.
Note: If you attempt to start AIXwindows without an available pointer device, such as a mouse or a tablet, AIXwindows will not open. Some devices can be plugged in but not defined and thus not available to the system, as well as the reverse.
An important point is that programs which are run by .xinitrc should be run in the background if they do not exit right away, so that they do not 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 does not exit (which indicates that the user is done and that xinit should exit).
An alternate client and/or server may be specified on the command line. The desired client program and its arguments should be given as the first command line arguments to xinit. To specify a particular server command line, add a -- (double dash) to the xinit command line (after any client and arguments) followed by the desired server command.
Both the client program name and the server program name must begin with a / (slash) or a . (period). Otherwise, they are treated as an arguments to be added 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 a clear server name is not given and the first argument following the -- (double dash) is a : (colon) followed by a number, xinit uses that number as the display number instead of zero. All remaining arguments are added to the server command line.
The following environment variables are used with the xinit command:
xinit
xinit -- /usr/bin/X11/X qdss:1
xinit -geometry =80x65+10+10 -fn 8x13 -j -fg white -bg navy
xinit -e widgets -- ./Xsun -l -c
xinit /usr/ucb/rsh fasthost cpupig -display ws:1 -- :1 -a 2 -t 5
xrdb -load $HOME/.Xresources xsetroot -solid gray & xclock -g 50x50-0+0 -bw 0 & xload -g 50x50-50+0 -bw 0 & xterm -g 80x24+0+0 & xterm -g 80x24+0-0 & mwm
#!/bin/sh . /usr/local/lib/site.xinitrc
#!/bin/sh xinit /usr/local/lib/site.xinitrc -- /usr/bin/X11/X bc
The startx command, X command.