More D-Bus goodness in system-config-printer

Previously I’ve described the D-Bus activation of dialogs in system-config-printer-1.3.  That D-Bus interface has been extended to help improve GNOME.

Fedora 15 has been released for a little while now, including GNOME 3.  One of the great new features in this release of GNOME is the System Settings window.  It is easily accessed from the system menu in the top right corner of the desktop.

This shows a System Settings window containing an overview of all the various tweakable settings for the system, including personal preferences.  They are shown as icons, such as “Keyboard”, “Background”, “Printers” etc, organised into groups: Personal, Hardware, System, and Other.  Clicking on one of them changes the window so it shows the settings relating to that topic.  So if you click on Printers, you get this:

It’s great to have printer configuration in GNOME, and this interface is nice and simple.  There are a couple of things that it needs to learn to do though.

One of them is choosing a good driver when adding a printer.  This is something that is not easy, and system-config-printer has a fair amount of logic to deal with it.  Now that logic is exposed via D-Bus, so the GNOME System Settings program will be able to use it in future.

node "/org/fedoraproject/Config/Printing" {
  interface "org.fedoraproject.Config.Printing" {
    method "GetBestDrivers"      (
      in s device_id
      in s device_make_and_model
      in s device_uri
      out a(ss) drivers
    )
  }
}

Given the IEEE 1284 Device ID of the printer, and/or a string describing the make and model, and the CUPS device URI to be used, this method returns a list of drivers that should work.  They are ordered with the “best” choice first, and with descriptions of how good a fit each driver is for this model (e.g. exact, close, etc).

Two other methods have been exposed using D-Bus.  The first is a method for examining a PPD and deciding whether it has unmet requirements.  Often a PPD will containing information about what commands to run to convert from various different formats into the format required for the printer.  This method parses those and returns a list of executables that are missing.

node "/org/fedoraproject/Config/Printing" {
  interface "org.fedoraproject.Config.Printing" {
    method "MissingExecutables"      (
      in s ppd_filename
      out as missing_executables
    )
  }
}

The final method is for grouping together CUPS device URIs that address the same physical device.  It is often the case that there is a choice of backends to use for a printer, and this method helps to sort out which devices are just different choices for the same printer.

node "/org/fedoraproject/Config/Printing" {
  interface "org.fedoraproject.Config.Printing" {
    method "GroupPhysicalDevices"      (
      in a{sa{ss}} devices
      out aas grouped_devices
    )
  }
}

It takes a dictionary (keyed by device URI) of IPP attribute dictionaries describing devices, and returns a list of physical devices, each one represented by a list of device URIs that refer to it.

These methods will be in system-config-printer 1.3.5.


Posted

in

by

Comments

3 responses to “More D-Bus goodness in system-config-printer”

  1. Rick Richardson avatar
    Rick Richardson

    I clicked on “System Settings ->Printer->Options” in F15. But, the only thing was a list of usernames and a Back button. No Options like in system-config-printer. No Page Size, no Media, no nothing!!!

    I put system-config-printer in my panel. Works good, lasts a long time!

  2. tim avatar

    As I understand it, one of the design goals of the GNOME 3 Printers screen is to be simple, not to do everything you might need.

  3. […] recently added support in system-config-printer for determining the best driver to use for a particular printer.  This is […]