Normal Installation and Configuration

DRI Compilation Guide : Normal Installation and Configuration
Previous: Compiling the XFree86/DRI tree
Next: Testing the Server Without Installing It

## 9. Normal Installation and Configuration

Most users will want to install the new X server and use it instead of the original X server. This section explains how to do that. We assume that the user is upgrading from XFree86 3.3.x.

Developers, on the other hand, may just want to test the X server without actually installing it as their default server. If you want to do that, skip to the next section.

### 9.1. X Installation

You'll need to run as root to do the following commands:

    	      su

As mentioned above, the installation directory is specified by the `ProjectRoot` variable in the `host.def` file. Create that directory now if it doesn't already exist, then run the install commands:

    	      mkdir /usr/X11R6-DRI
    	      cd ~/DRI-CVS/build/xc
    	      make install

### 9.2. Linker configuration

Edit your `/etc/ld.so.conf` file and put `/usr/X11R6-DRI/lib` as the first line. Then run:

    	      ldconfig

This will ensure that you use the new X libraries when you run X programs.

### 9.3. Update Locale Information

To update your X locale information do the following:

                 cd ~/DRI-CVS/build/xc/nls
                 ../config/util/xmkmf -a
                 make
                 make install

This will prevent a locale error message from being printed when you run Xlib programs.

### 9.4. Setup Miscellaneous Files

Issue the following commands:

                 cd /usr/X11R6-DRI/lib/X11
                 ln -s /usr/X11R6/lib/X11/rgb.txt .
                 ln -s /usr/X11R6/lib/X11/fonts .
                 ln -s /usr/X11R6/lib/X11/app-defaults .

This will allow applications to use the fonts and resources that they used in the past.

### 9.5. Disable the Old X Server and Enable the New One

Assuming that an installation of XFree86 3.3.x is present, we need to disable the old 3.3.x X server and enable the new 4.0.x X server.

Issue the following commands:

                 cd /usr/X11R6/bin
                 mv Xwrapper Xwrapper.old
                 rm X
                 ln -s /usr/X11R6-DRI/bin/XFree86  X

This will cause the new X server to be used instead of the original one.

### 9.6. Create the XF86Config File

Configuration files for XFree86 3.3.x will not work with XFree86 4.0.x.

The new 4.0.x server can generate a basic configuration file itself. Simply do this:

                 cd /usr/X11R6-DRI/bin
                 ./XFree86 -configure

A file named `/root/XF86Config.new` will be created. It should allow you to try your X server but you'll almost certainly have to edit it. For example, you should add `HorizSync` and `VertRefresh` options to the `Monitor` section and `Modes` options to the `Screen` section. Also, the `ModulePath` option in the `Files` section should be set to `/usr/X11R6-DRI/lib/modules`.

On the DRI web site, in the resources section, you'll find example XF86Config files for a number of graphics cards. These configuration files also setup DRI options so it's highly recommended that you look at these examples.

In any case, your new XF86Config file should be placed in `/etc/X11/XF86Config-4`. This configuration file will be recognized by the 4.0.x server but not by 3.3.x servers. You can instead name it `/etc/X11/XF86Config` but that'll overwrite your old config file, which you may want to preserve.

### 9.7. Start the New X Server

The new X server should be ready to use now. Start your X server in your usual manner. Typically, the `startx` command is used:

                 startx

DRI Compilation Guide : Normal Installation and Configuration
Previous: Compiling the XFree86/DRI tree
Next: Testing the Server Without Installing It