initial commit
[profile/ivi/xorg-x11-xinit.git] / startx.man
1 .\" $Xorg: startx.man,v 1.4 2001/02/09 02:05:49 xorgcvs Exp $
2 .\" $XdotOrg$
3 .\" Copyright 1993, 1998  The Open Group
4 .\" 
5 .\" Permission to use, copy, modify, distribute, and sell this software and its
6 .\" documentation for any purpose is hereby granted without fee, provided that
7 .\" the above copyright notice appear in all copies and that both that
8 .\" copyright notice and this permission notice appear in supporting
9 .\" documentation.
10 .\"
11 .\" The above copyright notice and this permission notice shall be included
12 .\" in all copies or substantial portions of the Software.
13 .\"
14 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 .\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 .\" OTHER DEALINGS IN THE SOFTWARE.
21 .\"
22 .\" Except as contained in this notice, the name of The Open Group shall
23 .\" not be used in advertising or otherwise to promote the sale, use or
24 .\" other dealings in this Software without prior written authorization
25 .\" from The Open Group.
26 .\"
27 .\" $XFree86: xc/programs/xinit/startx.man,v 1.7 2001/04/19 15:08:32 dawes Exp $
28 .\"
29 .TH STARTX 1 __xorgversion__
30 .SH NAME
31 startx \- initialize an X session
32 .SH SYNOPSIS
33 .B startx
34 [ [
35 .I client
36 ]
37 .I options
38 \&\.\|.\|. ] [
39 .B \-\^\-
40 [
41 .I server
42 ] [
43 .I display
44 ]
45 .I options
46 \&.\|.\|. ]
47 .SH DESCRIPTION
48 The \fIstartx\fP script is a front end to \fIxinit\fP that provides a
49 somewhat nicer user interface for running a single session of the X
50 Window System.  It is often run with no arguments.
51 .PP
52 Arguments immediately following the
53 .I startx
54 command are used to start a client in the same manner as
55 .IR xinit (1).
56 The special argument
57 .RB '--'
58 marks the end of client arguments and the beginning of server options.
59 It may be convenient to specify server options with startx to change on a
60 per-session basis the
61 default color depth, the server's notion of the number of dots-per-inch the
62 display device presents, or take advantage of a different server layout, as
63 permitted by the
64 .IR __XSERVERNAME__ (1)
65 server and specified in the
66 .IR __XCONFIGFILE__ (__filemansuffix__)
67 file.  Some examples of specifying server arguments follow; consult the
68 manual page for your X server to determine which arguments are legal.
69 .RS
70 .PP
71 startx -- -depth 16
72 .PP
73 startx -- -dpi 100
74 .PP
75 startx -- -layout Multihead
76 .RE
77 #ifdef __SCOMAN__
78 .PP
79 To determine the client to run,
80 .I startx
81 looks for the following files, in order:
82 .RS
83 .PP
84 .I $(HOME)/.startxrc
85 .PP
86 .I __libdir__/sys.startxrc
87 .PP
88 .I $(HOME)/.xinitrc
89 .PP
90 .I __xinitdir__/xinitrc
91 .RE
92 .PP
93 #else
94 .PP
95 To determine the client to run,
96 .I startx
97 first looks for a file called
98 .I .xinitrc
99 in the user's home directory.  If that is not found, it uses
100 the file
101 .I xinitrc
102 in the
103 .I xinit
104 library directory.
105 #endif
106 If command line client options are given, they override this
107 behavior and revert to the
108 .IR xinit (1)
109 behavior.
110 To determine the server to run,
111 .I startx
112 first looks for a file called
113 .I .xserverrc
114 in the user's home directory.  If that is not found, it uses
115 the file
116 .I xserverrc
117 in the
118 .I xinit
119 library directory.
120 If command line server options are given, they override this
121 behavior and revert to the
122 .IR xinit (1)
123 behavior.  Users rarely need to provide a
124 .I .xserverrc
125 file.
126 See the
127 .IR xinit (1)
128 manual page for more details on the arguments.
129 .PP
130 The system-wide
131 .I xinitrc
132 and
133 .I xserverrc
134 files are found in the
135 .I __xinitdir__
136 directory.
137 .PP
138 The
139 .I .xinitrc
140 is typically a shell script which starts many clients according to the
141 user's preference.  When this shell script exits,
142 .I startx
143 kills the server and performs any other session shutdown needed.
144 Most of the clients started by
145 .I .xinitrc
146 should be run in the background.  The last client should run in the
147 foreground; when it exits, the session will exit.  People often choose
148 a session manager, window manager, or \fIxterm\fP as the ''magic'' client.
149 .SH EXAMPLE
150 .PP
151 Below is a sample \fI\.xinitrc\fP that starts several applications and
152 leaves the window manager running as the ''last'' application.  Assuming that
153 the window manager has been configured properly, the user
154 then chooses the ''Exit'' menu item to shut down X.
155 .sp
156 .in +4
157 .nf
158 xrdb \-load $HOME/.Xresources
159 xsetroot \-solid gray &
160 xbiff \-geometry \-430+5 &
161 oclock \-geometry 75x75\-0\-0 &
162 xload \-geometry \-80\-0 &
163 xterm \-geometry +0+60 \-ls &
164 xterm \-geometry +0\-100 &
165 xconsole \-geometry \-0+0 \-fn 5x7 &
166 exec twm
167 .fi
168 .in -4
169 .SH "ENVIRONMENT VARIABLES"
170 .TP 25
171 DISPLAY
172 This variable gets set to the name of the display to which clients should
173 connect.  Note that this gets
174 .IR set ,
175 not read.
176 .TP 25
177 XAUTHORITY
178 This variable, if not already defined, gets set to
179 .IR $(HOME)/.Xauthority .
180 This is to prevent the X server, if not given the
181 .I \-auth
182 argument, from automatically setting up insecure host-based authentication
183 for the local host.  See the
184 .IR Xserver (1)
185 and
186 .IR Xsecurity (__miscmansuffix__)
187 manual pages for more information on X client/server authentication.
188 .SH FILES
189 #ifdef __SCOMAN__
190 .TP 25
191 .I $(HOME)/.startxrc
192 Client to run.  Typically a shell script which runs many programs in
193 the background.
194 .TP 25
195 .I __libdir__/sys.startxrc
196 Client to use if the user has no
197 .I .startxrc
198 file.
199 #endif
200 .TP 25
201 .I $(HOME)/.xinitrc
202 Client to run.  Typically a shell script which runs many programs in
203 the background.
204 .TP 25
205 .I $(HOME)/.xserverrc
206 Server to run.  The default is
207 .IR X .
208 .TP 25
209 .I __xinitdir__/xinitrc
210 Client to run if the user has no
211 .I .xinitrc
212 file.
213 .TP 25
214 .I __xinitdir__/xserverrc
215 Server to run if the user has no
216 .I .xserverrc
217 file.
218 .SH "SEE ALSO"
219 .IR xinit (1),
220 .IR Xserver (1),
221 .IR __XSERVERNAME__ (1)