# Install notes

## Software Requirements

To compile and run DDCcontrol, you need to have these packages installed:

- libxml2

- pci-utils

- gtk+>=2.4

In addition to the library packages, you also need the development packages, which are not usually installed. For example, on Debian, their names are `libxml2-dev`, `pciutils-dev` and `libgtk2.0-dev`. Other distributions probably have similar package names. On Fedora Core 5, you will also need `gnome-panel-devel` package.

You don't need pci-utils if you don't use direct PCI memory access, and you don't need gtk+ if you don't plan to use the Gnome GUI. Usually, this is not the case, so you will almost certainly want these packages for compiling ddccontrol.

## Download the sources

Go to the download section of ddccontrol project's page and download the latest `ddccontrol` and `ddccontrol-db` source tarballs.

Then unpack these two archives with:

    # tar xvfz ddccontrol-X.Y.tar.gz
    # tar xvfz ddccontrol-db-YYYYMMDD.tar.gz

You should now have two directories, `ddccontrol` and `ddccontrol-db`.

## Compile and install

To compile and install the source tarballs, type:

    # ./configure
    # make
    # su root
    Password: <root password>
    # make install

You need to do this in `ddccontrol` and `ddccontrol-db` directories.

If you set the `--prefix` parameter when configuring one package, you must set it to the same value when configuring the other.

## Configure `/dev/i2c-*` devices

`/dev/i2c-*` devices are only working with kernel 2.6 or greater.

If your graphics card is supported by `/dev/i2c-*` devices (see supportedgc), you must load the `i2c-dev` module by typing, as root:

    # modprobe i2c-dev

You must also load your graphics card framebuffer driver (for card-specific instructions see supportedgc).

If you want to automatically load these modules when Linux starts, see your distribution's documentation.

On systems not using devfs, even after loading framebuffer and i2c-dev modules, the devices `/dev/i2c/*` or `/dev/i2c-*` does not exist. On Debian, these devices are created using this command :

    # /sbin/MAKEDEV i2c

To allow standard (i.e. non-root) users to use DDCcontrol, you must change permissions on `/dev/i2c-*`. This is done by typing, as root:

    # chmod a+rw /dev/i2c-*

### Kernel configuration options

If `i2c-dev` or your graphics card's framebuffer modules are not available with your kernel, you can build your own kernel with the following options turned on (with recommend to build them as modules):

- Devices drivers I2C support .
- Devices drivers I2C support I2C device interface .
- Devices drivers Graphics support Framebuffer support .
- and a specific driver for your graphic card (see supportedgc).

## Installation on Debian (and derivatives)

The ddccontrol and ddccontrol-db packages are available in Debian (and derivatives). You simply need to install the ddccontrol package and all the proper dependencies will be installed along with it. For example:

    # apt-get install ddccontrol