Owner

Current status

Detailed Description

All printers, whether connected by parallel port, USB, bluetooth or network, identify themselves using an IEEE 1284 Device ID string. This is a sequence of key:value pairs with, among others, fields for the manufacturer, the model, the command sets supported by the printer.

The idea behind this feature is to add RPM tags to printer driver packages to match up with the manufacturer and model fields used by printers to identify themselves. Once this is done system-config-printer can use PackageKit to install the driver required for a printer when it is connected, or when a queue is set up for it interactively.

The way these RPM tags can be added automatically to printer driver packages is by using a "provides" script. This will look for PPD files, read through them to find a "1284DeviceID" PPD attribute, and parse the IEEE 1284 Device ID string to extract the "MFG" and "MDL" fields. Here is an example of a snippet of a PPD that contains a 1284DeviceID attribute:

PPD files are the simplest way for a driver to make itself available through CUPS. Another way is to provide a driver information file, and similarly to PPD files these must include a 1284DeviceID attribute for each PPD they define in order for automatic printer driver installation to work. The hpcups driver from the hplip package is an example of this type.

Yet another way for a driver to integrate with CUPS is for it to provide a CUPS driver. This is a program that generates PPD files on demand. When CUPS runs the program with "list" as its argument, it must write out a list of all the PPDs it is prepared to generate. In order for the manufacturers and models to be automatically tagged in the RPM package, this list must contain the appropriate Device ID strings. The gutenprint-cups and foomatic packages have examples of this type of driver.

To ensure a printer driver's binary RPMs are given postscriptdriver() tags, add "BuildRequires: pycups, cups" to the RPM spec file.

Dynamic drivers should ensure they can be executed from within the build root of their source package. The DESTDIR environment variable will be set when run this way. The gutenprint package has been patched to use DESTDIR to search for its XML files when the dynamic driver is run, for example.

Benefit to Fedora

Very often the wrong driver is used and bugs are reported about "the" driver not working, when the answer was to install another package. Of course it is also easy to be misled into thinking that there is no driver for a particular model simply because that model does not show in the CUPS model list (that list is built from the information provided by the installed drivers).

Scope

All the printer drivers need to report IEEE 1284 Device IDs, including at least the MFG and MDL fields, for the majority of the printers they support.

HPLIP and gutenprint (DONE)

Still needed for others such as pbm2l2030 and other small drivers like that

PackageKit needs support for the new tag type (DONE)

RPM needs to be able to add the tags. Patch ready.

system-config-printer needs to be able to install packages for automatically-detected USB printers

system-config-printer needs to be able to install packages for printers when manually adding a queue

How To Test

Connecting a USB printer

Start with the relevant driver package for your printer *not* installed and the printer disconnected.