--- xml/htdocs/doc/en/xorg-config.xml 2004/05/14 15:15:08 1.2 +++ xml/htdocs/doc/en/xorg-config.xml 2007/06/09 12:40:12 1.22 @@ -1,6 +1,6 @@ - + @@ -19,11 +19,11 @@ - + -1.1 -May 10, 2004 +1.16 +2007-06-09 What is the X Window Server? @@ -48,7 +48,7 @@

As standards are important, a standard for drawing and moving windows on a -screen, interacting with the user through mouse and keyboard and other basic yet +screen, interacting with the user through mouse, keyboard and other basic, yet important aspects has been created and named the X Window System, commonly abbreviated as X11 or just X. It is used on Unix, Linux and Unix-like operating systems throughout the world. @@ -58,10 +58,8 @@ The application that provides Linux users with the ability to run graphical user interfaces and that uses the X11 standard is Xorg-X11, a fork of the XFree86 project. XFree86 has decided to use a license that might not be -compatible with the GPL license; the use of Xorg is therefore recommended. Note -though that the differences between Xorg and XFree86 are currently very slim; if -you know one, you know the other. XFree86 versions prior to 4.4 are available -through Portage as well. +compatible with the GPL license; the use of Xorg is therefore recommended. +The official Portage tree does not provide an XFree86 package anymore.

@@ -72,8 +70,8 @@

The X.org project created and -maintains a freely redistributable open-source implementation of the X11 system. -It is an open source X11-based desktop infrastructure. +maintains a freely redistributable, open-source implementation of the X11 +system. It is an open source X11-based desktop infrastructure.

@@ -86,6 +84,7 @@ + Installing Xorg

@@ -98,18 +97,92 @@ though, so you might want to grab a snack while you are waiting.

+

+Before installing Xorg you have to configure two important variables in the +/etc/make.conf file. +

+ +

+The first one is VIDEO_CARDS. This is used to set the video drivers that +you intend to use and is usually based on the kind and brand of card you have. +The most common settings are nvidia for Nvidia cards or fglrx for +ATI Radeon cards. Those are the proprietary drivers from Nvidia and ATI +respectively. If you would like to use the open source versions, use nv +rather than nvidia in the variable, but bear in mind that using this +driver means no 3d acceleration at all. The free radeon driver for ATI +cards supports full 3D acceleration on older Radeons but doesn't work at all +with the newer ones. VIDEO_CARDS may contain more than one driver, in +this case list of them should be separated with spaces. +

+ +

+The second variable is INPUT_DEVICES and is used to determine which +drivers are to be built for input devices. In most cases setting it to +keyboard mouse should work just fine. +

+ +

+Now you should decide which drivers you will use and add necessary settings to +the /etc/make.conf file: +

+ +
+(For mouse and keyboard support)
+INPUT_DEVICES="keyboard mouse"
+(For Nvidia cards)
+VIDEO_CARDS="nvidia"
+(OR, for ATI Radeon cards)
+VIDEO_CARDS="fglrx"
+
+ +

+More instructions on how to configure Nvidia and ATI cards can be found in +Gentoo Linux nVidia Guide and in +Gentoo Linux ATI FAQ. If you don't know +which drivers you should choose, refer to these guides for more information. +

+ + +If the suggested settings don't work for you, you should run emerge -pv +xorg-x11, check all the options available and choose those which +apply to your system. In different versions of Xorg and on different +architectures displaying these variables can be done with emerge -pv +xorg-server command rather than the one above. The example is for x86 +architecture and xorg-x11-7.0. + + +
+# emerge -pv xorg-x11
+
+These are the packages that would be merged, in order:
+
+Calculating dependencies... done!
+[ebuild   R   ] x11-base/xorg-x11-7.0-r1  USE="-3dfx" INPUT_DEVICES="keyboard
+mouse -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300
+-elographics -evdev -fpit -hyperpen -jamstudio -joystick -magellan -magictouch
+-microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957
+-ur98 -vmmouse -void -wacom" VIDEO_CARDS="nvidia -apm -ark -chips -cirrus
+-cyrix -dummy -fbdev -fglrx -glint -i128 -i740 -i810 -imstt -mach64 -mga
+-neomagic -nsc -nv -r128 -radeon -rendition -s3 -s3virge -savage -siliconmotion
+-sis -sisusb -tdfx -tga -trident -tseng -v4l -vesa -vga -via -vmware -voodoo" 0
+kB
+
+ +

+After setting all the necessary variables you can install the Xorg package. +

+
 # emerge xorg-x11
 

-When the installation is finished, you might need to reinitialise some +When the installation is finished, you might need to re-initialise some environment variables before you continue. Just run env-update followed -by source /etc/profile and you're all set. This doesn't harm your system -in any way. +by source /etc/profile and you're all set.

-
+
 # env-update
 # source /etc/profile
 
@@ -167,18 +240,16 @@

-# Xorg -config /root/xorg.conf.new
+# X -config /root/xorg.conf.new
 

-If all goes well, you should see an ugly, loathsome, repulsive, deformed -window manager called twm, probably the smallest window manager -available. Try moving your mouse and see if your keyboard and such is working. -In the next section we will optimize our xorg.conf so it fits your -hardware. Now go into one of the terminals you see on your screen and type in -exit (or press Ctrl-D) until Xorg shuts down. If you are unable to -use your mouse to focus the terminals, you can also press Ctrl-Alt-Backspace to -kill the X server. +If all goes well, you should see a simple black and white pattern. Verify if +your mouse works correctly and if the resolution is good. If you received errors +about "/dev/mouse", try changing your mouse device to /dev/input/mice in +the "InputDevice" section of xorg.conf. You might not be able to +deduce the exact resolution, but you should be able to see if it's too low. You +can exit any time by pressing Ctrl-Alt-Backspace.

@@ -197,39 +268,81 @@ # xorgconfig
+

+Another tool, also provided by Xorg, is xorgcfg, which will first +attempt to run Xorg -configure and then start the X server for more +final tweaking. +

+ +
+# xorgcfg
+(In case X crashes or the configuration fails, try:)
+# xorgcfg -textmode
+
+
-
- -Tweaking xorg.conf
Copying over xorg.conf

-Let us first copy over the xorg.conf.new to -/etc/X11/xorg.conf so we won't have to continuously run Xorg --config -- typing startx is far more easy :) +Let us copy over the xorg.conf.new to +/etc/X11/xorg.conf now, so we won't have to continuously run +X -config -- typing just X or startx is far more easy :)

 # cp /root/xorg.conf.new /etc/X11/xorg.conf
 
+ +
+
+Using startx + +

-Now run startx to start up your X server. It will use the freshly copied -file as its configuration file. To finish the X session, type in exit or -Ctrl-D in the upcoming xterms. You can also kill the X session using the -Ctrl-Alt-Backspace combination. This will however make X exit disgracefully - -something that you might not always want. It doesn't hurt though :) +Now try startx to start up your X server. startx is a script +that executes an X session, that is, it starts the X servers and some +graphical applications on top of it. It decides which applications to run +using the following logic:

+
    +
  • + If a file named .xinitrc exists in the home directory, it will + execute the commands listed there. +
  • +
  • + Otherwise, it will read the value of the XSESSION variable and will execute + one of the sessions available in /etc/X11/Sessions/ + accordingly (you can set the value of XSESSION in /etc/rc.conf + to make it a default for all the users on the system). +
  • +
  • + If all of the above fail, it will fall back to a simple window manager, + usually twm. +
  • +
+
 # startx
 
+

+If you see an ugly, loathsome, repulsive, deformed window manager, that's +twm. To finish the twm session, type in exit or Ctrl-D in the +upcoming xterms. You can also kill the X session using the Ctrl-Alt-Backspace +combination. This will however make X exit disgracefully -- something that you +might not always want. It doesn't hurt though :) +

+
+
+ +Tweaking xorg.conf
Setting your Resolution @@ -237,7 +350,7 @@

If you feel that the screen resolution is wrong, you will need to check two sections in your configuration. First of all, you have the Screen section -which lists the resolutions - if any - that your X server will run at. By +which lists the resolutions, if any that your X server will run at. By default, this section might not list any resolutions at all. If this is the case, Xorg will estimate the resolutions based on the information in the second section, Monitor. @@ -254,7 +367,7 @@

-Do not "just" change the values of these two monitor-related variables +Do not "just" change the values of these two monitor related variables without consulting the technical specifications of your monitor. Setting incorrect values lead to out-of-sync errors at best and smoked up screens at worst. @@ -264,7 +377,7 @@ Now let us change the resolutions. In the next example from /etc/X11/xorg.conf we add the Modes lines and the DefaultDepth so that our X server starts with 24 bits at 1024x768 by -default. Don't mind the given strings - they are examples and will most likely +default. Don't mind the given strings -- they are examples and will most likely differ from the settings on your system.

@@ -304,7 +417,7 @@ Identifier "Generic Keyboard" Driver "keyboard" Option "CoreKeyboard" - Option "XkbRules" "xfree86" + Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "be" EndSection @@ -318,15 +431,17 @@

If your mouse isn't working, you will first need to find out if it is detected -by the kernel at all. PS/2 mice are (device-wise) seen as -/dev/psaux. Other mice (like USBs) are seen as -/dev/input (or /dev/input/mice). In either case you -can check if the devices do represent your mouse by checking the output of those -files when you move your mouse. To end the session press Ctrl-C. +by the kernel at all. Mice are (device-wise) seen as +/dev/input/mouse0 (or /dev/input/mice if you want to +use several mice). In some cases /dev/psaux is used. In either +case you can check if the devices do represent +your mouse by checking the output of those files when you move your mouse. You +will usually see some junk on your screen. To end the session press +Ctrl-C.

-# cat /dev/input
+# cat /dev/input/mouse0
 (Don't forget to press Ctrl-C to end this)
 
@@ -337,8 +452,8 @@

If your mouse is detected, fill in the device in the appropriate InputDevice section. In the next example you'll see we also set two other -options: Protocol (which lists the mouse protocol to be used - most users -will use PS/2 or IMPS/2) and ZAxisMapping (which allows for the +options: Protocol (which lists the mouse protocol to be used -- most +users will use PS/2 or IMPS/2) and ZAxisMapping (which allows for the mousewheel (if applicable) to be used).

@@ -347,7 +462,7 @@ Identifier "TouchPad Mouse" Driver "mouse" Option "CorePointer" - Option "Device" "/dev/psaux" + Option "Device" "/dev/input/mouse0" Option "Protocol" "IMPS/2" Option "ZAxisMapping" "4 5" EndSection @@ -404,5 +519,24 @@
+
+Other resources + + +

+If you want to update your system from the old monolithic Xorg to the newer, +modular Xorg 7, you should refer to the Migrating to Modular X +HOWTO. +

+ +

+More information about configuring different packages to work in X environment +can be found in the Gentoo Desktop +Documentation Resources section of our documentation. +

+ + +