CAPS Universe documentation  1.0.4
All you need to know to be successful
Printer Device Database

The Printer Device Database

The Printer Device Database is a simple INI file with one section per printer device. It contains some detailed data about printer devices which were at least seen once at this system. This detailed data is used to remember it, if it is seen again. This ensures settings made for a specific printer device are persistent.

This file is owned by root, who also has write permissions. The group of this file is lp with read permissions only. Since the Printer Preparation runs as root, it can extend the Printer Device Database. The Printer Driver Launcher is member of the group lp, because it only needs to read the Printer Device Database to identify the attached printer device and launch its matching device driver.

The Printer Device Database INI file is named via the macro PRINTER_DATABASE_NAME and located in the CAPS Printer Device Database Directory.

A generated content of one device entry of the Printer Device Database looks like this:

[printer-<random>]
type=usb
vid=<number>
pid=<number>
serial=<string>
descr-ini=<some-name.ini>
param-dir=<random>

The section name is always unique and build with a leading fixed string and a random trailing string. The random trailing string corresponds to the CAPS Printer Device Parameter Directory used by exactly this device.

The type key defines the printer device connection type. Currently only usb is valid.

The vid, pid and serial keys are USB printer device specific and used to clearly identify exactly one printer device. Since you can connect more than one printer device of the same model, the serial key is important to distinguish them unmistakable.

The descr-ini key points to the corresponding Printing Provider Description INI File. It is used to parametrize the printer driver at run-time. This file is expected in the CAPS Printer Driver Database Directory.

The param-dir key points to the corresponding CAPS Printer Device Parameter Directory which contains user made settings for this printing provider/printer device. This sub-directory is part of the CAPS Printer Device Database Directory.

Note
This INI file starts with a # Machine generated. Do not edit this file. statement. But if you know what are you doing, you can edit this file with a simple editor to match your needs. Its new content is read-in again when the next printer gets connected to the host.