From Fedora Project Wiki
(Current status)
Line 16: Line 16:
* Targeted release: [[Releases/13 | Fedora 13]]  
* Targeted release: [[Releases/13 | Fedora 13]]  
* Last Updated: 2010-02-05
* Last Updated: 2010-02-05
* Percentage of completion: 90%
* Percentage of completion: 100%
All Fedora printer driver packages rebuilt with new RPM tags.  The system-config-printer application and applet are ready to use gnome-packagekit's session D-Bus API for installing printer driver packages.
The code to add the new API method to gnome-packagekit has been committed upstream, just need a new Fedora package to be built.
== Detailed Description ==
== Detailed Description ==

Revision as of 09:43, 17 February 2010

Automatic printer driver installation


Packages like gutenprint-cups, hpijs, and foomatic should be installed on-demand when hardware requiring those drivers is detected.


  • email:

Current status

  • Targeted release: Fedora 13
  • Last Updated: 2010-02-05
  • Percentage of completion: 100%

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:

*%==== General Information Keywords ========================
*FormatVersion: "4.3"
*FileVersion: "1.03"
*LanguageEncoding: ISOLatin1
*LanguageVersion: English
*Manufacturer: "Brother"
*PCFileName: "BR5250_2.PPD"
*Product: "(Brother HL-5250DN series)"
*PSVersion: "(3010.106) 5"
*ShortNickName: "Brother HL-5250DN BR-Script3"
*ModelName: "Brother HL-5250DN BR-Script3"
*NickName: "Brother HL-5250DN BR-Script3"
*1284DeviceID: "MFG:Brother;MDL:HL-5250DN series;CMD:PJL,PCL,PCLXL,POSTSCRIPT;"

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).


  • 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.

Connect the printer and power it on.

You may be asked for authentication to install packages.

You should be asked to print a test page.

You must be able to print to the printer.

Adding a queue manually

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

Select System->Administration->Printing.

Select a network printer (can be 'Internet Printing Protocol' for another CUPS server).

You may be asked for authentication to install packages.

If a list of drivers is shown, the correct driver should already be selected in the list.

You should be asked to print a test page.

You must be able to print to the printer.

User Experience

Plugging in a printer just works, whenever this is possible. The LiveCD does not have to ship with printer drivers on it.


Contingency Plan

Revert to previous behaviour.

Add foomatic-db-ppds to comps.


This is it.

Release Notes

Printer drivers are now installed automatically when a printer is connected.

Comments and Discussion