| 1 | <?xml version='1.0' encoding='UTF-8'?> |
1 | <?xml version='1.0' encoding='UTF-8'?> |
| 2 | |
2 | |
| 3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xorg-config.xml,v 1.8 2005/02/14 09:26:19 swift Exp $ --> |
3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xorg-config.xml,v 1.13 2005/04/18 13:30:08 swift Exp $ --> |
| 4 | |
4 | |
| 5 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
5 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 6 | |
6 | |
| 7 | <guide link="xorg-config.xml"> |
7 | <guide link="xorg-config.xml"> |
| 8 | |
8 | |
| … | |
… | |
| 20 | |
20 | |
| 21 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
21 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 22 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
22 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
| 23 | <license/> |
23 | <license/> |
| 24 | |
24 | |
| 25 | <version>1.7</version> |
25 | <version>1.11</version> |
| 26 | <date>2005-02-07</date> |
26 | <date>2005-04-18</date> |
| 27 | |
27 | |
| 28 | <chapter> |
28 | <chapter> |
| 29 | <title>What is the X Window Server?</title> |
29 | <title>What is the X Window Server?</title> |
| 30 | <section> |
30 | <section> |
| 31 | <title>Graphical vs Command-Line</title> |
31 | <title>Graphical vs Command-Line</title> |
| … | |
… | |
| 167 | <pre caption="Testing the xorg.conf.new file"> |
167 | <pre caption="Testing the xorg.conf.new file"> |
| 168 | # <i>X -config /root/xorg.conf.new</i> |
168 | # <i>X -config /root/xorg.conf.new</i> |
| 169 | </pre> |
169 | </pre> |
| 170 | |
170 | |
| 171 | <p> |
171 | <p> |
| 172 | If all goes well, you should see an ugly, loathsome, repulsive, deformed |
172 | If all goes well, you should see a simple black and white pattern. Verify if |
| 173 | window manager called <c>twm</c>, probably the smallest window manager |
173 | your mouse works correctly and if the resolution is good. You might not be able |
| 174 | available. Try moving your mouse and see if your keyboard and such is working. |
174 | to deduce the exact resolution, but you should be able to see if it's too low. |
| 175 | In the next section we will optimize our <path>xorg.conf</path> so it fits your |
175 | You can exit any time by pressing Ctrl-Alt-Backspace. |
| 176 | hardware. Now go into one of the terminals you see on your screen and type in |
|
|
| 177 | <c>exit</c> (or press Ctrl-D) until Xorg shuts down. If you are unable to |
|
|
| 178 | use your mouse to focus the terminals, you can also press Ctrl-Alt-Backspace to |
|
|
| 179 | kill the X server. |
|
|
| 180 | </p> |
|
|
| 181 | |
|
|
| 182 | <p> |
|
|
| 183 | If <c>twm</c> doesn't load, don't worry - it will once you'll start the X server |
|
|
| 184 | through the regular <c>startx</c> command. Verify if your mouse works correctly |
|
|
| 185 | and if the resolution is good. You might not be able to deduce the exact |
|
|
| 186 | resolution, but you should be able to see if it's too low. You can exit any time |
|
|
| 187 | by pressing Ctrl-Alt-Backspace. |
|
|
| 188 | </p> |
176 | </p> |
| 189 | |
177 | |
| 190 | </body> |
178 | </body> |
| 191 | </section> |
179 | </section> |
| 192 | <section> |
180 | <section> |
| … | |
… | |
| 201 | |
189 | |
| 202 | <pre caption="Semi-Automatic Generation of xorg.conf"> |
190 | <pre caption="Semi-Automatic Generation of xorg.conf"> |
| 203 | # <i>xorgconfig</i> |
191 | # <i>xorgconfig</i> |
| 204 | </pre> |
192 | </pre> |
| 205 | |
193 | |
|
|
194 | <p> |
|
|
195 | Another tool, also provided by Xorg, is <c>xorgcfg</c>, which will first |
|
|
196 | attempts to run <c>Xorg -configure</c> and then start the X server for more |
|
|
197 | final tweaking. |
|
|
198 | </p> |
|
|
199 | |
|
|
200 | <pre caption="Using xorgcfg"> |
|
|
201 | # <i>xorgcfg</i> |
|
|
202 | <comment>(In case X crashes or the configuration fails, try:)</comment> |
|
|
203 | # <i>xorgcfg -textmode</i> |
|
|
204 | </pre> |
|
|
205 | |
|
|
206 | </body> |
|
|
207 | </section> |
|
|
208 | <section> |
|
|
209 | <title>Copying over xorg.conf</title> |
|
|
210 | <body> |
|
|
211 | |
|
|
212 | <p> |
|
|
213 | Let us copy over the <path>xorg.conf.new</path> to |
|
|
214 | <path>/etc/X11/xorg.conf</path> now, so we won't have to continuously run |
|
|
215 | <c>X -config</c> -- typing just <c>X</c> or <c>startx</c> is far more easy :) |
|
|
216 | </p> |
|
|
217 | |
|
|
218 | <pre caption="Copying over xorg.conf"> |
|
|
219 | # <i>cp /root/xorg.conf.new /etc/X11/xorg.conf</i> |
|
|
220 | </pre> |
|
|
221 | |
|
|
222 | </body> |
|
|
223 | </section> |
|
|
224 | <section id="using_startx"> |
|
|
225 | <title>Using startx</title> |
|
|
226 | <body> |
|
|
227 | |
|
|
228 | <p> |
|
|
229 | Now try <c>startx</c> to start up your X server. <c>startx</c> is a script |
|
|
230 | that executes an <e>X session</e>, that is, it starts the X servers and some |
|
|
231 | graphical applications on top of it. It decides which applications to run |
|
|
232 | using the following logic: |
|
|
233 | </p> |
|
|
234 | |
|
|
235 | <ul> |
|
|
236 | <li> |
|
|
237 | If a file named <path>.xinitrc</path> exists in the home directory, it will |
|
|
238 | execute the commands listed there. |
|
|
239 | </li> |
|
|
240 | <li> |
|
|
241 | Otherwise, it will read the value of the XSESSION variable and will execute |
|
|
242 | one of the sessions available in <path>/etc/X11/Sessions/</path> |
|
|
243 | accordingly (you can set the value of XSESSION in <path>/etc/rc.conf</path> |
|
|
244 | to make it a default for all the users on the system). |
|
|
245 | </li> |
|
|
246 | <li> |
|
|
247 | If all of the above fail, it will fall back to a simple window manager, |
|
|
248 | usually <c>twm</c>. |
|
|
249 | </li> |
|
|
250 | </ul> |
|
|
251 | |
|
|
252 | <pre caption="Starting X"> |
|
|
253 | # <i>startx</i> |
|
|
254 | </pre> |
|
|
255 | |
|
|
256 | <p> |
|
|
257 | If you see an ugly, loathsome, repulsive, deformed window manager, that's |
|
|
258 | <c>twm</c>. To finish the twm session, type in <c>exit</c> or Ctrl-D in the |
|
|
259 | upcoming xterms. You can also kill the X session using the Ctrl-Alt-Backspace |
|
|
260 | combination. This will however make X exit disgracefully - something that you |
|
|
261 | might not always want. It doesn't hurt though :) |
|
|
262 | </p> |
|
|
263 | |
| 206 | </body> |
264 | </body> |
| 207 | </section> |
265 | </section> |
| 208 | </chapter> |
266 | </chapter> |
| 209 | <chapter> |
267 | <chapter> |
| 210 | <title>Tweaking xorg.conf</title> |
268 | <title>Tweaking xorg.conf</title> |
| 211 | <section> |
|
|
| 212 | <title>Copying over xorg.conf</title> |
|
|
| 213 | <body> |
|
|
| 214 | |
|
|
| 215 | <p> |
|
|
| 216 | Let us first copy over the <path>xorg.conf.new</path> to |
|
|
| 217 | <path>/etc/X11/xorg.conf</path> so we won't have to continuously run <c>Xorg |
|
|
| 218 | -config</c> -- typing <c>startx</c> is far more easy :) |
|
|
| 219 | </p> |
|
|
| 220 | |
|
|
| 221 | <pre caption="Copying over xorg.conf"> |
|
|
| 222 | # <i>cp /root/xorg.conf.new /etc/X11/xorg.conf</i> |
|
|
| 223 | </pre> |
|
|
| 224 | |
|
|
| 225 | <p> |
|
|
| 226 | Now run <c>startx</c> to start up your X server. It will use the freshly copied |
|
|
| 227 | file as its configuration file. To finish the X session, type in <c>exit</c> or |
|
|
| 228 | Ctrl-D in the upcoming xterms. You can also kill the X session using the |
|
|
| 229 | Ctrl-Alt-Backspace combination. This will however make X exit disgracefully - |
|
|
| 230 | something that you might not always want. It doesn't hurt though :) |
|
|
| 231 | </p> |
|
|
| 232 | |
|
|
| 233 | <pre caption="Starting X"> |
|
|
| 234 | # <i>startx</i> |
|
|
| 235 | </pre> |
|
|
| 236 | |
|
|
| 237 | </body> |
|
|
| 238 | </section> |
|
|
| 239 | <section> |
269 | <section> |
| 240 | <title>Setting your Resolution</title> |
270 | <title>Setting your Resolution</title> |
| 241 | <body> |
271 | <body> |
| 242 | |
272 | |
| 243 | <p> |
273 | <p> |
| … | |
… | |
| 322 | <title>Configuring your Mouse</title> |
352 | <title>Configuring your Mouse</title> |
| 323 | <body> |
353 | <body> |
| 324 | |
354 | |
| 325 | <p> |
355 | <p> |
| 326 | If your mouse isn't working, you will first need to find out if it is detected |
356 | If your mouse isn't working, you will first need to find out if it is detected |
| 327 | by the kernel at all. PS/2 mice are (device-wise) seen as |
357 | by the kernel at all. Mice are (device-wise) seen as |
| 328 | <path>/dev/psaux</path>. Other mice (like USBs) are seen as |
|
|
| 329 | <path>/dev/input</path> (or <path>/dev/input/mice</path>). In either case you |
358 | <path>/dev/input/mouse0</path> (or <path>/dev/input/mice</path> if you want to |
| 330 | can check if the devices do represent your mouse by checking the output of those |
359 | use several mice). In either case you can check if the devices do represent |
| 331 | files when you move your mouse. To end the session press <c>Ctrl-C</c>. |
360 | your mouse by checking the output of those files when you move your mouse. To |
|
|
361 | end the session press <c>Ctrl-C</c>. |
| 332 | </p> |
362 | </p> |
| 333 | |
363 | |
| 334 | <pre caption="Checking the device files"> |
364 | <pre caption="Checking the device files"> |
| 335 | # <i>cat /dev/input</i> |
365 | # <i>cat /dev/input/mouse0</i> |
| 336 | <comment>(Don't forget to press Ctrl-C to end this)</comment> |
366 | <comment>(Don't forget to press Ctrl-C to end this)</comment> |
| 337 | </pre> |
367 | </pre> |
| 338 | |
368 | |
| 339 | <p> |
369 | <p> |
| 340 | If your mouse isn't detected, verify if all the necessary modules are loaded. |
370 | If your mouse isn't detected, verify if all the necessary modules are loaded. |
| … | |
… | |
| 351 | <pre caption="Changing the mouse settings in Xorg"> |
381 | <pre caption="Changing the mouse settings in Xorg"> |
| 352 | Section "InputDevice" |
382 | Section "InputDevice" |
| 353 | Identifier "TouchPad Mouse" |
383 | Identifier "TouchPad Mouse" |
| 354 | Driver "mouse" |
384 | Driver "mouse" |
| 355 | Option "CorePointer" |
385 | Option "CorePointer" |
| 356 | <i>Option "Device" "/dev/psaux"</i> |
386 | <i>Option "Device" "/dev/input/mouse0"</i> |
| 357 | <i>Option "Protocol" "IMPS/2"</i> |
387 | <i>Option "Protocol" "IMPS/2"</i> |
| 358 | <i>Option "ZAxisMapping" "4 5"</i> |
388 | <i>Option "ZAxisMapping" "4 5"</i> |
| 359 | EndSection |
389 | EndSection |
| 360 | </pre> |
390 | </pre> |
| 361 | |
391 | |