PrinterDrake

NB: According to the launchpad entry, this project is superseded by system-config-printer.

Printerdrake as replacement for gnome-cups-manager

Summary

The default printer management tool of Ubuntu Linux is the gnome-cups-manager. This tool is not very feature-rich and especially it is not maintained upstream any more for a year or so. So there is no one to fix bugs and to add new features (like support for the new features of CUPS 1.2). So a sophisticated replacement is needed.

Rationale

Printer setup with the tools currently available in Ubuntu Linux still requires some system knowledge and manual work. It should be made as much automatic as possible but still give enough flexibility to the user.

Use cases

  • A user plugs in a USB printer and expects his system to configure it or at least to guide him through the printer's configuration.
  • A user wants to share his locally connected printer to the two other PCs in his office but not to the other PCs on the LAN. He wants only to give the two IP addresses to a tool and the tool should do the rest.
  • A user wants to set up a network printer. He does not really know which printers are available on the LAN.
  • A user has a network printer at home but he does not really know about IPs (his router gives an IP to every device).
  • The user has printers which need special configuration: HP multi-function, HP LaserJet 1000/1005/1018/1020 (firmware loading needed), ...

  • See the feature list below ...

Scope

This applies to Ubuntu and Xubuntu. KDE has its own printer management GUI, which is not covered here.

Design

Before I have started at Ubuntu, I have worked for 6 years for Mandriva (former Mandrake) and was responsible for the printing and digital imaging part of Mandriva Linux, starting with switching from LPD to CUPS in Mandrake 7.2 in autumn 2000 and afterwards improving the system a lot. Besides upstream-maintaining linuxprinting.org with Foomatic and XPP I have developed printerdrake, Mandriva's printer setup tool.

Printerdrake solves many bugs, problems and feature requests which people reported for Ubuntu's printing system:

  • Plug'n'Print: Automatic setup of print queue when plugging USB printer or when booting with a parallel or a USB printer

  • Network printer discovery via SNMP broadcast: CUPS 1.2 contains the SNMP backend for a very fast (4 sec typically) auto discovery of network printers. Not only the printer itself, but also its communication protocol and model are detected

  • Fuzzy matching of manufacturer and model name: For many printers the device ID string is missing in the Foomatic database or in the pre-built PPD files. Printerdrake uses different algorithms to match the human-readable manufacturer and model name with the ID string and this way usually assigns the correct PPD. For unknown printers it uses the page description language information in the ID string to assign a generic PostScript or PCL PPD file.

  • Duplicate display of the same PPD file/printer-driver combo in the printer list: An annoying problem with most printer setup tools is that some entries appear duplicate due to compatibility links or PPDs accidentally installed twice. Printerdrake recognizes such duplicates and suppresses their display.

  • Easy configuration of CUPS' printer sharing: A dialog to configure the most important settings of the CUPS daemon is provided. Users can select sub-networks or IPs for the machines to where to share the local printers and from where to accept broadcasts or to poll printer information. Also daemon-less CUPS clients can easily be configured. This solves this other feature request.

  • Automatic setup of HP's printers/MFPs with HPLIP: If printedrake detects a printer listed in HPLIP's /usr/share/hplip/data/xml/*.xml files, it automatically configures HPLIP (including addition of fax queue, SANE setup, ...) for this printer and tells the user about available extra functions.

  • Automatic download of printer firmware if needed: The HP LaserJet 1000, 1005, 1018, and 1020 need their firmware uploaded into the printer every time when the printer is turned on. As one cannot ship the copyrighted firmware in a distribution, printerdrake uses the tools coming with the foo2zjs printer driver to download the firmware automatically from HP, as soon as a queue for one of these printers is set up.

  • Treatment of several other special cases: For example some winprinter drivers communicate directly with the printer and not through a CUPS backend. In such cases the backend is set to file:/dev/null and the driver is set SUID root.

  • Beginner's mode which requires no knowledge of drivers, connection types, etc.: In beginner's mode printerdrake simply offers auto-detected printers and automatically assigns the recommended driver (model list does only contain model names, not driver names), default page size is set by system default locale, if printer supports optional attachments (trays, duplex, ...), wizard asks which attachments are installed.

  • Support for many CUPS 1.2 extra features: New features like backend error policy, per-printer exclusion from printer sharing, ... can be controlled by printerdrake's GUI.

  • Renaming print queues: Printerdrake is the only tool (AFAIK) which supports renaming print queues. As CUPS itself does not support it, printerdrake clones the print queue and deletes the old one, completely transparent to the user.

  • Probably more feature which I forgot in this moment: Everyone using Mandriva 2007 or CS4, add the missing features to this page, thanks.

Planned/possible improvements on printerdrake:

Ideas worked out on the Ubuntu Summit in Mountain View

  • Disable remote access to printer hidden from being broadcasted: When the user uses the function in the printer's config menu to make a printer invisible for remote machines it should not only make the printer excluded from being broadcasted by the new function of CUPS 1.2 but also being blocked against remote access by a per-printer localhost-only ACL (Suggested in feature PrinterSharing).

  • User guidance to access shared printers from Windows boxes: If a printer is shared the user should be somehow informed a bout the IPP URI to use on the Windows box and also instructions how to create a print queue for this printer on Windows with IPP or SMB access (Suggested in feature PrinterSharing).

  • Improve usability of printerdrake GUI: Every window except the main window of printerdrake is made with a convenience GUI library. This library is rather restricted in dialog layout and there are some bugs in the rendering/layout of the generated dialogs. So new dialogs should be designed (with Glade?), preferably by a GUI/Usability expert.

  • Automatic printer takedown and remembering when unplugging: Take down an unplugged/turned off printer but backup its configuration. If this printer is plugged again, auto-setup it with the backuped config and do not ask the user whether he wants the printer set up. Do not pop up any windows then. With this feature a roaming laptop user will not get his printer menues cluttered with printers only connected temporarily. He simply sees only the printers currently available and he does not loose any manual settings. This function should be configurable, as some users perhaps do not like the automatic takedown of print queues.

Improvement suggestions which are simple to implement

  • Faster auto-discovery of SMB/Windows printer shares: In the current printerdrake this is done by broadcast pings and a following port scan. This method is very slow. I have worked out a faster solution only using the Samba client utilities, see Launchpad bug #58403.

  • Support the network-wide defaults of CUPS-specific options: Make use of this CUPS-1.2 feature by using "lpadmin -p <printer> -o <option>-default=<value>" instead of "lpoptions" to set default of CUPS options. See CUPS STR #2029.

  • Use also Zeroconf to discover network printers: Scan for printers with "avahi -browse -k -t -v -r -a". See Mandriva bug #21812.

  • Warn user that auto-detected model name is sometimes not model name written on printer's case: Sometimes printers with equal hardware and firmware and different model names (different model names only because of bundled software or country-specific input voltage/power plug) report the same model name on auto-detection requests which results in cases where the reported model name is not the same as written on the printer. This makes some users reporting bugs like Launchpad bug #79607. Suggestion is to add a warning to the list of auto-detection results and/or supported models/drivers like: "Note: Printers do not necessarily identify themselves with the model name as specified on the printer's case, but the precision of the self identification is sufficient for selecting the correct driver.".

Improvements which need some more coding

  • Printer Maintenance: Functions for displaying ink/toner levels, cleaning nozzles, printing nozzle check, head alignment, color calibration using the appropriate command line tools of HPLIP (HP inkjet and laser), Gutenprint (Epson inkjet), and MTink (Epson inkjet). This makes the maintenance functions easier to find for the users and it also overcomes the problem that the GUI tools of HPLIP do not work out of the box with Ubuntu and Xubuntu due to PyQt not being included. See Launchpad bug #67892.

  • Pre-configure GNOME/GTK fax GUI and kdeprintfax with hp-sendfax command line if a fax queue for an HP MF device is created: Makes faxing with HP devices easier, overcomes also the problem that the GUI tools of HPLIP do not work out of the box with Ubuntu and Xubuntu due to PyQt not being included. See Launchpad bug #66830 and #67892.

  • "Clean printing system" Button: Add a button to clean all CUPS/printing-related caches, buffers, logs, spools, kill all printing-related processes, ask the user for power-cycling the printers and restart the daemons. On a desktop/home system it is a nice emergency button for the case that a printer goes crazy. Perhaps one could also make it configurable by a button to do such a clean-up on every boot.

  • Assign an IP to a printer: Wizard to configure the IP of a printer. Users do usually not know that to set the IP of a network printer they have to print a printer-internal config page, set the IP of their computer temporarily to an IP compatible to the printer's current IP, fire up the printer's web configuration interface, set the desired IP or DHCP/Automatic in the web interface, and finally put their computer's IP back to the original. A wizard could guide the user through these steps.

  • SMB Sharing of CUPS printer as emulated PostScript printer: This way Windows clients can easily access printers on a Linux server with automatic installation of only one driver on the clients, the PostScript driver. See "man cupsaddsmb" and the chapters about SMB printer sharing in my printing tutorial.

All software developed by Mandriva is published under GPL, including printerdrake and all needed libraries, so there is no problem with adoption into Ubuntu.

If you want to give printerdrake a try, get a live CD of the recently released Mandriva 2007, boot with plugged parallel/USB printer, or plug USB printer after boot). I will also bring appropriate CDs/DVDs to the Summit in Mountain View.

I have also shown printerdrake on the last Summit in Paris.

Implementation

printerdrake

The implementation of the new printerdrake package will happen in the following steps:

  • Make printerdrake running on non-Mandriva distros and independent of the other Mandriva config tools: (Mandriva's tools are all together in one package named drakxtools). All source tarballs are uploaded now, to easily access the code from non-RPM distributions. Martin Pitt (pitti) is working on making printerdrake running on Ubuntu.

  • Separation of all files really needed for printerdrake: Creation of new source tarballs containing only what we really need.

  • Upstreamization: Making an upstream publication of printerdrake in the internet, with some simple home page and a version control repository. Possible would be a Bazaar repository at linuxprinting.org/FSG OpenPrinting (servers of Free Standards Group).

  • Implementation of suggested improvements: Implement the suggestions listed above.

  • Ubuntu packaging: Make .deb packages for Feisty.

  • HAL setup in Ubuntu: Make HAL triggering the auto-generation of print queues on a newly plugged printer, make also the login of a privileged (group "lpadmin" user) trigger automatic queue generation (for printers which were plugged when no or an unprivileged user was logged in). Command to run for checking whether a printer is still without queue and setting it up is simply "printerdrake -onlyautoqueue".

gnome-cups-manager

  • Remove gnome-cups-manager: This tools is not maintained anymore upstream and not needed any more when we have printerdrake.

Data preservation and migration

Nothing necessary here as we replace only a GUI frontend for CUPS. All printer config info is managed and saved by CUPS and not by the printer setup tool, so no data to migrate or convert.

PrinterDrake (last edited 2008-08-06 16:29:21 by localhost)