xinitremot(1) USER COMMANDS xinitremot(1)
NAME
xinitremote - XRemote X Window System initializer
SYNOPSIS
xinitremote [[client] options] [-- [server] [display]
options]
DESCRIPTION
xinitremote starts the XRemote X Window System server and a
first client program (usually a terminal emulator). When
this first client exits, xinitremote kills the Xremote
server and then terminates.
When running xinitremote, Xremote acts as a proxy for
display n on the current host. The display number (n) is
chosen dynamically by Xremote, the chosen number is given
back to xinitremote, and then it is placed into the environ-
ment before the client is executed.
If no specific client program is given on the command line,
xinitremote will look for a file in the user's home direc-
tory called .xinitremoterc to run as a shell script to
start-up client programs. If no such file exists, xini-
tremote will use the following as a default:
xterm -geometry +1+1 -n login
If no specific server program is given on the command line,
xinitremote will look for a file in the user's home direc-
tory called .xserverrc to run as a shell script to start up
the server. If no such file exists, xinitremote will use
the following as a default:
Xremote :1 -report n
Note that this assumes there is a program named Xremote in
the current search path. Also, the n is replaced with the
file number that xinitremote opened to detect the actual
display number.
An important point is that programs which are run by .xini-
tremote and by .xserverrc 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 will not exit (which indicates that the user is done
and that xinitremote should exit).
An alternate client and/or server may be specified on the
command line. The desired client program and its arguments
1
xinitremot(1) USER COMMANDS xinitremot(1)
should be given as the first command line arguments to xini-
tremote. To specify a particular server command line, append
a double dash (--) to the xinitremote 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 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 server name is not given and the first argu-
ment following the double dash (--) is a colon followed by a
digit, Xremote will use that number as the display number
instead of its initial default of (1). All remaining argu-
ments are appended to the server command line.
EXAMPLES
Below are several examples of how command line arguments in
xinitremote are used.
xinitremote
This will start up a server named Xremote and run
the user's
xinitremote -geometry =80x65+10+10 -fn 8x13 -j -fg white -
bg navy
This will start up a server named Xremote, and will
append the given arguments to the default xterm com-
mand. It will ignore .xinitremoterc.
Below is a sample .xinitremoterc that starts a clock,
several terminals, 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 X.
xrdb -load $HOME/.Xres
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 &
twm
Sites that want to create a common startup environment could
simply create a default .xinitremoterc that references a
site-wide startup file:
#!/bin/sh
2
xinitremot(1) USER COMMANDS xinitremot(1)
. /usr/local/lib/site.xinitrc
Another approach is to write a script that starts xini-
tremote with a specific shell script. Such scripts are usu-
ally named x11, xstart, or startx and are a convenient way
to provide a simple interface for novice users:
#!/bin/sh
xinitremote /usr/local/bin/startx
ENVIRONMENT VARIABLES
DISPLAY This variable is set to the name of the display to
which clients should connect.
XINITRC This variable specifies an init file containing
shell commands to start up the initial windows. By
default, .xinitremoterc in the home directory will
be used.
TMPDIR This variable is used by the tempnam library call to
determine which directory the Xremote output will be
placed in.
FILES
/usr/tmp/Xremote*
This file contains redirected standard out and stan-
dard error streams from the Xremote server. The
numerical suffix of this file name is the display
number which was established by the Xremote server.
/dev/tty
This is the default line on which to run the Xremote
server. See Xremote(1) for further details.
$HOME/.xinitremoterc
This file contains the script which describes what
clients to start when the Xremote session is ini-
tiated.
$HOME/.xinitrc
For backward compatibility with older versions of
xinitremote, this file will be used as the startup
script if the .xinitremoterc file is not present.
SEE ALSO
X(1), xrdb(1), xterm(1), Xremote(1M), tempnam(3s).
3