If no specific client program is given on the command line, startxwin will look for a file in the user's home directory called .startxwinrc to run as a shell script to start up client programs. If no such file exists, startxwin will use the following as a default:
xterm -geometry +1+1 -n login -display :0
An important point is that programs which are run by .startxwinrc should be run in the background if they do not exit right away, so that they don't prevent other programs from starting up.
An alternate client and/or server command may be specified on the command line. The desired client program and its arguments should be given as the first command line arguments to startxwin. To specify particular server options, append a double dash (--) to the startxwin command line (after any client and arguments) followed by the desired server options. startxwin always supplies the -multiwindow option to the X server.
The client program name name must begin with a slash (/) or a period (.). Otherwise, it is treated as an argument to be appended to the client startup command. This makes it possible to add arguments (for example, foreground and background colors) without having to retype the whole command line.
If the first argument following the double dash (--) is a colon followed by a digit, startxwin will use that number as the display number instead of zero. All remaining arguments are appended to the server command line.
Below is a sample .startxwinrc that starts a clock and several terminals.
xrdb -load $HOME/.Xresources xclock -g 50x50-0+0 -bw 0 & xload -g 50x50-50+0 -bw 0 & xterm -g 80x24+0+0 & xterm -g 80x24+0-0 &
Sites that want to create a common startup environment could simply create a default .startxwinrc that references a site-wide startup file:
#!/bin/sh . /usr/local/lib/site.startxwinrc
Another approach is to write a script that starts startxwin with a specific shell script. Such scripts are usually named x11, xstart, or startx and are a convenient way to provide a simple interface for novice users:
#!/bin/sh startxwin /usr/local/lib/site.startxwinrc -- -br