Debian Codegraph @

upstream/debian-unstable/man1/xinit.1

raw
1 .\"
2 .\" Copyright 1988, 1998 The Open Group
3 .\"
4 .\" Permission to use, copy, modify, distribute, and sell this software and its
5 .\" documentation for any purpose is hereby granted without fee, provided that
6 .\" the above copyright notice appear in all copies and that both that
7 .\" copyright notice and this permission notice appear in supporting
8 .\" documentation.
9 .\"
10 .\" The above copyright notice and this permission notice shall be included
11 .\" in all copies or substantial portions of the Software.
12 .\"
13 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16 .\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
17 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19 .\" OTHER DEALINGS IN THE SOFTWARE.
20 .\"
21 .\" Except as contained in this notice, the name of The Open Group shall
22 .\" not be used in advertising or otherwise to promote the sale, use or
23 .\" other dealings in this Software without prior written authorization
24 .\" from The Open Group.
25 .\"
26 .TH XINIT 1 "xinit 1.4.2" "X Version 11"
27 .SH NAME
28 xinit \- X Window System initializer
29 .SH SYNOPSIS
30 .B xinit
31 [ [
32 .I client
33 ]
34 .I options
35 \&\.\|.\|. ] [
36 .B \-\^\-
37 [
38 .I server
39 ] [
40 .I display
41 ]
42 .I options
43 \&.\|.\|. ]
44 .SH DESCRIPTION
45 The \fBxinit\fP program is used to start the X Window System server and a first
46 client program on systems that are not using a display manager such as
47 .BR xdm (1)
48 or in environments
49 that use multiple window systems. When this first client exits,
50 \fBxinit\fP will kill the X server and then terminate.
51 .PP
52 If no specific client program is given on the command line,
53 \fBxinit\fP will look for a file in the user's home directory
54 called \fI.xinitrc\fP to run as a shell script to start up client programs.
55 If no such file exists, \fBxinit\fP will use the following as a default:
56 .sp
57 xterm \-geometry +1+1 \-n login \-display :0
58 .sp
59 .PP
60 If no specific server program is given on the command line,
61 \fBxinit\fP will look for a file in the user's home directory
62 called \fI.xserverrc\fP to run as a shell script to start up the server.
63 If no such file exists, \fIxinit\fP will use the following as a default:
64 .sp
65 X :0
66 .sp
67 Note that this assumes that there is a program named \fIX\fP in the current
68 search path. The site administrator should, therefore, make a link to the
69 appropriate type of server on the machine, or create a shell script that
70 runs \fBxinit\fP with the appropriate server.
71 .PP
72 Note, when using a \fI.xserverrc\fP script be sure to ``exec'' the real X server.
73 Failing to do this can make the X server slow to start and exit. For example:
74 .sp
75 exec Xdisplaytype
76 .PP
77 An important point is that programs which are run by \fI\.xinitrc\fP
78 should be run in the background if they do
79 not exit right away, so that they don't prevent other programs from
80 starting up.
81 However, the last long-lived program started (usually
82 a window manager or terminal emulator) should be
83 left in the foreground so that the script won't exit (which
84 indicates that the user is done and that \fBxinit\fP should exit).
85 .PP
86 An alternate client and/or server may be specified on the
87 command line. The desired client program and its arguments should be given
88 as the first command line arguments to \fBxinit\fP. To specify a particular
89 server command line, append a double dash (\-\^\-) to the \fBxinit\fP command
90 line (after any client and arguments) followed by the desired server command.
91 .PP
92 Both the client program name and the server program name must begin with a
93 slash (/) or a period (.). Otherwise, they are treated as an arguments to be
94 appended to their respective startup lines. This makes it possible to
95 add arguments (for example, foreground and background colors) without
96 having to retype the whole command line.
97 .PP
98 If an explicit server name is not given and the first argument following the
99 double dash (\-\^\-) is a colon followed by a digit, \fBxinit\fP will use that
100 number as the display
101 number instead of zero. All remaining arguments are appended to the server
102 command line.
103 .PP
104 .SH EXAMPLES
105 Below are several examples of how command line arguments in \fBxinit\fP are
106 used.
107 .TP 8
108 .B "xinit"
109 This will start up a server named \fIX\fP and run the user's \fI\.xinitrc\fP,
110 if it exists, or else start an \fIxterm\fP.
111 .TP 8
112 .B "xinit \-\^\- /usr/bin/Xvnc :1"
113 This is how one could start a specific type of server on an alternate display.
114 .TP 8
115 .B "xinit \-geometry =80x65+10+10 \-fn 8x13 \-j \-fg white \-bg navy"
116 This will start up a server named \fIX\fP, and will append the given
117 arguments to the default \fIxterm\fP command. It will ignore \fI\.xinitrc\fP.
118 .TP 8
119 .B "xinit \-e widgets \-\^\- ./Xorg \-l \-c"
120 This will use the command \fI\./Xorg \-l \-c\fP to start the server and will
121 append the arguments \fI\-e widgets\fP to the default \fIxterm\fP command.
122 .TP 8
123 .B "xinit /usr/bin/ssh \-X fasthost cpupig \-\^\- :1 \-a 2 \-t 5"
124 This will start a server named \fIX\fP on display 1 with the arguments
125 \fI\-a 2 \-t 5\fP. It will then start a remote shell on the machine
126 \fBfasthost\fP in which it will run the command \fIcpupig\fP, telling it
127 to display back on the local workstation.
128 .PP
129 Below is a sample \fI\.xinitrc\fP that starts a clock, several terminals, and
130 leaves the window manager running as the ``last'' application. Assuming that
131 the window manager has been configured properly, the user
132 then chooses the ``Exit'' menu item to shut down X.
133 .sp
134 .in +8
135 .nf
136 xrdb \-load $HOME/.Xresources
137 xsetroot \-solid gray &
138 xclock \-g 50x50\-0+0 \-bw 0 &
139 xload \-g 50x50\-50+0 \-bw 0 &
140 xterm \-g 80x24+0+0 &
141 xterm \-g 80x24+0\-0 &
142 twm
143 .fi
144 .in -8
145 .sp
146 Sites that want to create a common startup environment could simply create
147 a default \fI\.xinitrc\fP that references a site-wide startup file:
148 .sp
149 .in +8
150 .nf
151 \&#!/bin/sh
152 \&. /etc/X11/xinit/site.xinitrc
153 .fi
154 .in -8
155 .sp
156 Another approach is to write a script that starts \fBxinit\fP with a specific
157 shell script. Such scripts are usually named \fIx11\fP, \fIxstart\fP, or
158 \fIstartx\fP and are a convenient way to provide a simple interface for
159 novice users:
160 .sp
161 .in +8
162 .nf
163 \&#!/bin/sh
164 xinit /etc/X11/xinit/site.xinitrc \-\^\- /usr/bin/X \-br
165 .fi
166 .in -8
167 .sp
168 .SH "ENVIRONMENT VARIABLES"
169 .TP 15
170 .B DISPLAY
171 This variable gets set to the name of the display to which clients should
172 connect.
173 .TP 15
174 .B XINITRC
175 This variable specifies an init file containing shell commands to start up the
176 initial windows. By default, \fI\.xinitrc\fP in the home directory will be
177 used.
178 .SH FILES
179 .TP 15
180 .I .xinitrc
181 default client script
182 .TP 15
183 .I xterm
184 client to run if \fI.xinitrc\fP does not exist
185 .TP 15
186 .I .xserverrc
187 default server script
188 .TP 15
189 .I X
190 server to run if \fI.xserverrc\fP does not exist
191 .SH "SEE ALSO"
192 .BR X (7),
193 .BR startx (1),
194 .BR Xserver (1),
195 .BR Xorg (1),
196 .BR xorg.conf (5),
197 .BR xterm (1)
198 .SH AUTHOR
199 Bob Scheifler, MIT Laboratory for Computer Science