CUPS
Original author(s) | Michael Sweet (Easy Software Products) |
---|---|
Developer(s) | Apple Inc. |
Initial release | June 9, 1999 |
Stable release | 2.4.8[1]
/ 26 April 2024 |
Repository | |
Written in | Apache License 2.0[3] |
Website | www |
Developer(s) | OpenPrinting and community |
---|---|
Stable release | 2.4.2[4]
/ May 26, 2022 |
Repository | github |
Predecessor | Apple CUPS |
Website | openprinting |
CUPS (formerly an
CUPS consists of a
History
Overview
CUPS provides a mechanism that allows print jobs to be sent to printers in a standard fashion. The print data goes to a scheduler[14] which sends jobs to a filter system that converts the print job into a format the printer will understand.[15] The filter system then passes the data on to a backend—a special filter that sends print data to a device or network connection.[16] The system makes extensive use of PostScript and rasterization of data to convert the data into a format suitable for the destination printer.
CUPS offers a standard and modularised printing system that can process numerous data formats on the print server. Before CUPS, it was difficult to find a standard printer management system that would accommodate the very wide variety of printers on the market using their own printer languages and formats. For instance, the System V and Berkeley printing systems were largely incompatible with each other, and they required complicated scripts and workarounds to convert the program's data format to a printable format. They often could not detect the file format that was being sent to the printer and thus could not automatically and correctly convert the data stream. Additionally, data conversion was performed on individual workstations rather than a central server.
CUPS allows printer manufacturers and printer-driver developers to more easily create drivers that work natively on the print server. Processing occurs on the server, allowing for easier network-based printing than with other Unix printing systems. With
Scheduler
The CUPS scheduler implements Internet Printing Protocol (IPP) over HTTP/1.1. A helper application (cups-lpd) converts Line Printer Daemon protocol (LPD) requests to IPP. The scheduler also provides a web-based interface for managing print jobs, the configuration of the server, and for documentation about CUPS itself.[14]
An authorization module controls which IPP and HTTP messages can pass through the system.[17] Once the IPP/HTTP packets are authorized they are sent to the client module, which listens for and processes incoming connections. The client module is also responsible for executing external CGI programs as needed to support web-based printers, classes, and job status monitoring and administration.[18] Once this module has processed its requests, it sends them to the IPP module which performs Uniform Resource Identifier (URI) validation to prevent a client from sidestepping any access controls or authentication on the HTTP server.[19] The URI is a text string that indicates a name or address that can be used to refer to an abstract or physical resource on a network.
The scheduler allows for classes of printers. Applications can send requests to groups of printers in a class, allowing the scheduler to direct the job to the first available printer in that class.[20] A jobs module manages print jobs, sending them to the filter and backend processes for final conversion and printing, and monitoring the status messages from those processes.[21]
The CUPS scheduler utilizes a configuration module, which parses configuration files, initializes CUPS data structures, and starts and stops the CUPS program. The configuration module will stop CUPS services during configuration file processing and then restart the service when processing is complete.[22]
A logging module handles the logging of scheduler events for access, error, and page
Other modules used by the scheduler include:
- the MIME module, which handles a Multipurpose Internet Mail Extensions (MIME) type and conversion database used in the filtering process that converts print data to a format suitable for a print device;[24]
- a PPD module that handles a list of Postscript Printer Description (PPD) files;[25]
- a devices module that manages a list of devices that are available in the system;[26]
- a printers module that handles printers and PPDs within CUPS.[27]
Filter system
CUPS can process a variety of data formats on the print server. It converts the print-job data into the final language/format of the printer via a series of filters.
MIME databases
After the CUPS system has assigned the print job to the scheduler, it is passed to the CUPS filter system. This converts the data to a format suitable for the printer. During start-up, the CUPS daemon loads two MIME databases: mime.types
that defines the known file types that CUPS can accept data for, and mime.convs
that defines the programs that process each particular MIME type.[30]
The mime.types
file has the syntax:
mimetype { [file-extensions] | [pattern-match] }
For example, to detect an HTML file, the following entry would be applicable:
text/html html htm \
printable(0,1024) + (string(0,"<HTML>") string(0,"<!DOCTYPE"))
The second line matches the file contents to the specified MIME type by determining that the first kilobyte of text in the file holds printable characters and that those characters include HTML markup. If the pattern above matches, then the filter system would mark the file as the MIME type text/html.[31]
The mime.convs
file has the syntax:
source destination cost program
The source field designates the MIME type that is determined by looking up the mime.types
file, while the destination field lists the type of output requested and determines what program should be used. This is also retrieved from mime.types
. The cost field assists in the selection of sets of filters when converting a file. The last field, program, determines which filter program to use to perform the data conversion.[32]
Some examples:
text/plain application/postscript 50 texttops application/vnd.cups-postscript application/vnd.cups-raster 50 pstoraster image/* application/vnd.cups-postscript 50 imagetops image/* application/vnd.cups-raster 50 imagetoraster
Filtering process
The filtering process works by taking input data pre-formatted with six arguments:
- the job ID of the print job
- the user name
- the job name
- the number of copies to print
- any print options
- the filename (though this is unnecessary if it has been redirected from standard input).[29]
It then determines the type of data that is being input and the filter to be used through the use of the MIME databases; for instance, image data will be detected and processed through a particular filter, and HTML data detected and processed through another filter.
CUPS can convert supplied data either into
- raster to PCL
- raster to ESC/P2 (an Epsonprinter language, now largely superseded by their new ESC/P-Raster format)
- raster to Dymo(another printer company).
- raster to Zebra Programming Language or ZPL (a Zebra Technologies printer language)
As of 2009[update] other proprietary languages like GDI or SPL (Samsung Printer Language) are supported by Splix, a raster to SPL translator.[35]
However, several other alternatives can integrate with CUPS.
Backends
The backends are the ways in which CUPS sends data to printers. There are several backends available for CUPS:
A new mdns
backend in CUPS 1.4 provides
Compatibility
CUPS provides both the System V and Berkeley printing commands, so users can continue with traditional commands for printing via CUPS. CUPS uses port 631 (TCP and UDP), which is the standard IPP port, and optionally on port 515 by
commands are installed as compatible programs. This allows a standard interface to CUPS and allows maximum compatibility with existing applications that rely on these printing systems.User interface tools
Several tools exist to help set up CUPS.
CUPS web-based administration interface
On all platforms, CUPS has a web-based administration interface that runs on
It particularly helps organisations that need to monitor print jobs and add print queues and printers remotely.CUPS 1.0 provided a simple class, job, and printer-monitoring interface for web browsers.
CUPS 1.1 replaced this interface with an enhanced administration interface that allows users to add, modify, delete, configure, and control classes, jobs, and printers.
CUPS 1.2 and later provide a revamped web interface which features improved readability and design, support for automatically discovered printers, and better access to system logs and advanced settings.
GNOME
In GNOME starting from GNOME 3, CUPS printing has been handled in the Settings application, which is part of the GNOME Core Applications. The GUI can add CUPS printers and manage CUPS printers and queues.[40] Before GNOME 3, the GNOME Print Settings (formerly called CUPS Manager) were used to perform these tasks.[41]
GNOME's
KDE
The KDEPrint framework for
KDEPrint supports several different printing platforms, with CUPS one of the best supported. It replaced a previous version of printing support in KDE, qtcups and is backwards compatible with this module of KDE. As of 2009[update] kprinter, a
KDEPrint's main components include:
- a Print Dialog box, which allows printer properties to be modified
- a Print Manager, which allows management of printers, such as adding and removing printers, through an Add Printer Wizard
- a Job Viewer/Manager, which manages printer jobs, such as hold/release, cancel and move to another printer
- a CUPS configuration module (integrated into KDE)
Mac OS X
In Mac OS X 10.5, printers are configured in the Print & Fax panel in
PrinterSetup
The PrinterSetup system can manage CUPS queues. It takes the approach of assigning a text file to describe each print queue. These 'PrinterSetupFiles' may then be added to other text files called 'PrinterSetupLists'. This allows logical grouping of printers. As of 2009[update] the PrinterSetup project remains in its infancy.[43]
Red Hat Linux/Fedora
Starting with Red Hat Linux 9, Red Hat provided an integrated print manager based on CUPS and integrated into GNOME. This allowed adding printers via a user interface similar to the one Microsoft Windows uses, where a new printer could be added using an add new printer wizard, along with changing default printer properties in a window containing a list of installed printers. Jobs could also be started and stopped using a print manager, and the printer could be paused using a context menu that pops up when the printer icon is right-clicked.
Eric Raymond criticised this system in his piece The Luxury of Ignorance. Raymond had attempted to install CUPS using the Fedora Core 1 print manager but found it non-intuitive; he criticised the interface designers for not designing with the user's point of view in mind. He found the idea of printer queues not obvious because users create queues on their local computer but these queues are actually created on the CUPS server.
He also found the plethora of queue-type options confusing as he could choose from between networked CUPS (IPP), networked Unix (LPD), networked Windows (SMB), networked Novell (NCP) or networked JetDirect. He found the help file singularly unhelpful and largely irrelevant to a user's needs. Raymond used CUPS as a general topic to show that user-interface design on Linux desktops needs rethinking and more careful design. He stated:[44]
The meta-problem here is that the configuration wizard does all the approved rituals (GUI with standardized clicky buttons, help popping up in a browser, etc. etc.) but doesn't have the central attribute these are supposed to achieve: discoverability. That is, the quality that every point in the interface has prompts and actions attached to it from which you can learn what to do next. Does your project have this quality?
ESP Print Pro
Easy Software Products, the original creators of CUPS, created a GUI, provided support for many printers and implemented a PostScript RIP. ESP Print Pro ran on Windows, UNIX and Linux, but is no longer available and support for this product ended on December 31, 2007.[45]
See also
- Foomatic
- Gutenprint
- HP Linux Imaging and Printing
- Lp (Unix)
- LPRng
- Scanner Access Now Easy
- Spooling
- Xprint
References
- ^ "v2.4.8". April 26, 2024. Retrieved April 26, 2024.
- ^ "CUPS 2". Retrieved September 3, 2020.
- ^ "CUPS Software License Agreement". GitHub. License Exceptions. Archived from the original on November 10, 2017. Retrieved November 8, 2017.
- ^ "Releases · OpenPrinting/cups". GitHub. Retrieved February 3, 2022.
- ^ Sweet, Michael (June 9, 1999). "A Bright New Future for Printing on Linux". Linux Today. Archived from the original on October 5, 2007.
- ^ Sweet, Michael (June 11, 1999). "The Future Brightens for Linux Printing". Linux Today. Archived from the original on January 8, 2005.
- ^ "CUPS Presentation at 2012 Open Printing Summit" (PDF). April 24, 2012. Archived (PDF) from the original on February 14, 2017.
- ^ "CUPS Licensed for Use in Apple Operating Systems!". Easy Software Products (press release). March 1, 2002. Archived from the original on December 8, 2015.
- ^ "CUPS Purchased by Apple Inc" (Press release). CUPS. July 11, 2007. Archived from the original on March 31, 2014. Retrieved June 5, 2014.
- ^ Anderson, Tim (October 15, 2020). "Has Apple abandoned CUPS, the Linux's world's widely used open-source printing system? Seems so". The Register. Retrieved January 7, 2023.
- ^ "Thoughts on Leaving Apple..." www.msweet.org.
- ^ Proven, Liam (November 10, 2022). "OpenPrinting keeps old printers working, even on Windows". The Register. Retrieved January 7, 2023.
- ^ Michael Sweet (October 17, 2020). "Add an OpenPrinting changes file". CUPS (OpenPrinting fork) repository. GitHub.
- ^ a b "CUPS Design Description". CUPS documentation. Apple Inc. Scheduler. Retrieved December 31, 2020.
- ^ "CUPS Design Description". CUPS documentation. Apple Inc. Filters. Retrieved December 31, 2020.
- ^ "CUPS Design Description". CUPS documentation. Apple Inc. Backend. Retrieved December 31, 2020.
- ^ "Authorization". Easy Software Products. CUPS Software Design. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ "Authorisation". Easy Software Products. CUPS Software Administrators Manual. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ "IPP". Easy Software Products. CUPS Software Design. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ "Classes". Easy Software Products. CUPS Software Administrators Manual. Archived from the original on January 6, 2007. Retrieved January 9, 2007.
- ^ "Jobs". Easy Software Products. CUPS Software Administrators Manual. Archived from the original on January 6, 2007. Retrieved January 9, 2007.
- ^ "Configuration". Easy Software Products. CUPS Software Design. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ "Logging". Easy Software Products. CUPS Software Design. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ "MIME". Easy Software Products. CUPS Software Design. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ "PPD". Easy Software Products. CUPS Software Design. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ "Devices". Easy Software Products. CUPS Software Design. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ "Printers". Easy Software Products. CUPS Software Design. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ "Filters". Easy Software Products. CUPS Software Administrators Manual. Archived from the original on January 6, 2007. Retrieved January 9, 2007.
- ^ a b "Filters". Easy Software Products. CUPS Software Design. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ "File Typing and Filtering". Easy Software Products. CUPS Software Administrators Manual. Archived from the original on January 6, 2007. Retrieved January 9, 2007.
- ^ "mime.types". Easy Software Products. CUPS Software Administrators Manual. Archived from the original on January 6, 2007. Retrieved January 9, 2007.
- ^ "mime.convs". Easy Software Products. CUPS Software Administrators Manual. Archived from the original on January 6, 2007. Retrieved January 9, 2007.
- ^ "pstops". Easy Software Products. CUPS Software Administrators Manual. Archived from the original on January 10, 2007. Retrieved January 9, 2007.
- ^ The MIME type for the CUPS raster format is application/vnd.cups-raster.
- ^ "SPL driver for UNIX". splix.sourceforge.net.
- ^ "Debian - Details of package cups-pdf in wheezy". Archived from the original on May 1, 2015.
- ^ "What's New in CUPS 1.4". Archived from the original on November 2, 2012.
- ^ "What's New in CUPS 1.6". Archived from the original on October 4, 2012.
- ^ "Managing Printers from the Web". CUPS Software Administrators Manual. Archived from the original on December 25, 2004.
- ^ "Handling printing in GNOME Red Hat Enterprise Linux 8". Red Hat Customer Portal. Red Hat. Retrieved May 12, 2021.
- ^ "gnome-cups-manager". Archived from the original on September 15, 2014.
- ^ printing.kde.org Webmaster (n.d.). "KDEPrint Homepage". Archived from the original on May 9, 2008. Retrieved April 2, 2008.
- ^ "Printer Setup is in a prototyping phase". Lucid Information Systems. Archived from the original on August 28, 2008.
- ^ "The Luxury of Ignorance: An Open-Source Horror Story". Archived from the original on May 28, 2010.
- ^ "Easy Software Products' ESP Print Pro". Archived from the original on June 19, 2009.
Further reading
- Design of CUPS Filtering System — including the context for Mac OS X ("Jaguar"). LinuxPrinting.org. Retrieved January 5, 2005.
- KDE. KDEPrint information. KDE-printing website. Retrieved January 14, 2005.
- How to Manage Printers in Linux, Linux.com, 2015-04-27.