History
Overview
Scheduler
The CUPS scheduler implementsFilter system
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.
The mime.types
file has the syntax:
mimetype
For example, to detect an text/html html htm \
printable(0,1024) + (string(0," ") string(0,"
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.
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.
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
In computer programming, standard streams are interconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdin ...
).
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 PostScript
PostScript (PS) is a page description language in the electronic publishing and desktop publishing realm. It is a dynamically typed, concatenative programming language. It was created at Adobe Systems by John Warnock, Charles Geschke, ...
data or directly into raster data. If it is converted into PostScript data an additional filter is applied called a ''prefilter'', which runs the PostScript data through another PostScript converter so that it can add printer-specific options like selecting page ranges to print, setting ''n''-up mode and other device-specific things. After the pre-filtering is done, the data can either be sent directly to a CUPS backend
Back end, back-end or backend may refer to:
Electronics Computing
* Back end (computing), the data access layer in software architecture
* Back-end CASE
* Back-end database, a database accessed indirectly through an external application
* Back-e ...
if using a PostScript printer, or it can be passed to another filter like Foomatic
Foomatic is a configurable printing filter. It uses PPD files as configuration to generate appropriate output for a given printer. It is spooler independent which means it can be used with Common Unix Printing System (CUPS), LPRng and others. ...
by linuxprinting.org
The Linux Foundation (LF) is a Nonprofit organization, non-profit technology consortium founded in 2000 as a merger between Open Source Development Labs and the Free Standards Group to standardize Linux, support its growth, and promote its com ...
. Alternatively, it can be passed to Ghostscript
Ghostscript is a suite of software based on an interpreter for Adobe Systems' PostScript and Portable Document Format (PDF) page description languages. Its main purposes are the rasterization or rendering of such page description language file ...
, which converts the PostScript into an intermediary ''CUPS-raster'' format.The MIME type for the CUPS raster format is application/vnd.cups-raster. The intermediary raster format is then passed onto a final filter which converts the raster data to a printer-specific format. The default filters included with CUPS include:
* raster to PCL PCL may refer to:
Aviation
*FAP Captain David Abenzur Rengifo International Airport, near Pucallpa, Peru (IATA code: PCL)
*Pilot-controlled lighting, a system by which aircraft pilots can control the lighting of runways and taxiways via radio cont ...
* raster to ESC/P
ESC/P, short for Epson Standard Code for Printers and sometimes styled Escape/P, is a printer control language developed by Epson to control computer printers. It was mainly used in dot matrix printers and some inkjet printers, and is still wide ...
or ESC/P2 (an Epson
Seiko Epson Corporation, or simply known as Epson, is a Japanese multinational electronics company and one of the world's largest manufacturers of computer printers and information- and imaging-related equipment. Headquartered in Suwa, Nagano ...
printer language, now largely superseded by their new ESC/P-Raster format)
* raster to Dymo
Dymo Corporation is an American manufacturing company of handheld label printers and thermal-transfer printing tape as accessory, embossing tape label makers, and other printers such as CD and DVD labelers and durable medical equipment.
The c ...
(another printer company).
* raster to Zebra Programming Language or ZPL (a Zebra Technologies
Zebra Technologies Corporation is an American mobile computing company specializing in technology used to sense, analyze, and act in real time. The company manufactures and sells marking, tracking, and computer printing technologies. Its product ...
printer language)
other proprietary languages like GDI or SPL (Samsung Printer Language) are supported by Splix, a raster to SPL translator.
However, several other alternatives can integrate with CUPS. HPLIP
The HPLIP (HP Linux Imaging and Printlng) project—initiated and led by HP Inc. (HP)—aims to ease Linux systems' ability to interact with HP's inkjet and laser printers with full printing, scanning, and faxing support. the supplied printer ...
(previously known as HP-IJS) provides Linux+CUPS drivers for HP printers, Gutenprint
Gutenprint (formerly Gimp-Print) is a collection of free-software printer drivers for use with UNIX spooling systems, such as CUPS, lpr and LPRng. These drivers provide printing services for Unix-like systems (including Linux and macOS), RISC OS ...
(previously known as Gimp-Print) is a range of high-quality printer drivers for (mostly) inkjet printers, and TurboPrint
TurboPrint is a closed source printer driver system for Linux, AmigaOS and MorphOS. It supports a number of printers that don't yet have a free driver, and fuller printer functionality on some printer models. In recent versions, it integrates wit ...
for Linux has another range of quality printer drivers for a wide range of printers.
Backends
The backends are the ways in which CUPS sends data to printers. There are several backends available for CUPS: parallel
Parallel is a geometric term of location which may refer to:
Computing
* Parallel algorithm
* Parallel computing
* Parallel metaheuristic
* Parallel (software), a UNIX utility for running programs in parallel
* Parallel Sysplex, a cluster of I ...
, serial, and USB
Universal Serial Bus (USB) is an industry standard that establishes specifications for cables, connectors and protocols for connection, communication and power supply ( interfacing) between computers, peripherals and other computers. A broa ...
ports, cups-pdf PDF Virtual Printing, as well as network backends that operate via the IPP IPP may refer to:
Organisations
* Independent Power Producer, electric power generator
* India Pride Project, recovering stolen Indian artefacts
* Istituto per la Protezione delle Piante (Institute of Plant Protection), Italy
* Max-Planck-Insti ...
, JetDirect
HP Jetdirect is the name of a technology sold by Hewlett-Packard that allows computer printers to be directly attached to a Local Area Network. The "Jetdirect" designation covers a range of models from the external 1 and 3 port parallel print se ...
(AppSocket), Line Printer Daemon
The Line Printer Daemon protocol/Line Printer Remote protocol (or LPD, LPR) is a network printing protocol for submitting print jobs to a remote printer. The original implementation of LPD was in the Berkeley printing system in the BSD UNIX opera ...
("LPD"), and SMB protocol
Protocol may refer to:
Sociology and politics
* Protocol (politics), a formal agreement between nation states
* Protocol (diplomacy), the etiquette of diplomacy and affairs of state
* Etiquette, a code of personal behavior
Science and technology
...
s.
A new mdns
backend in CUPS 1.4 provides Bonjour
Bonjour is a French word meaning (literally translated) "good day", and is commonly used as a greeting.
Bonjour may also refer to:
People
* Laurence BonJour (born 1943), epistemologist and professor of philosophy at the University of Washington
* ...
(DNS-SD
Zero-configuration networking (zeroconf) is a set of technologies that automatically creates a usable computer network based on the Internet Protocol Suite (TCP/IP) when computers or network peripherals are interconnected. It does not require manu ...
) based printer discovery. In CUPS 1.6, Bonjour printer discovery and sharing using Avahi is also supported.
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 inetd
inetd (internet service daemon) is a super-server daemon on many Unix systems that provides Internet services. For each configured service, it listens for requests from connecting clients. Requests are served by spawning a process which runs the ...
, launchd
launchd is an init and operating system service management daemon created by Apple Inc. as part of macOS to replace its BSD-style init and SystemStarter. There have been efforts to port launchd to FreeBSD and derived systems.
Components
...
, the Solaris
Solaris may refer to:
Arts and entertainment Literature, television and film
* ''Solaris'' (novel), a 1961 science fiction novel by Stanisław Lem
** ''Solaris'' (1968 film), directed by Boris Nirenburg
** ''Solaris'' (1972 film), directed by ...
Service Management Facility Service Management Facility (SMF) is a feature of the Solaris operating system as of version 10 and OpenSolaris-descendant illumos with its illumos distributions, that creates a supported, unified model for services and service management on each S ...
, or xinetd
In computer networking, xinetd (''Extended Internet Service Daemon'') is an open-source super-server daemon which runs on many Unix-like systems, and manages Internet-based connectivity.
It offers a more secure alternative to the older inetd ...
which use the cups-lpd helper program to support LPD printing. When CUPS is installed the lp
System V printing system The printing subsystem of UNIX System V is one of several standardized systems for printing on Unix, and is typical of commercial System V-based Unix versions such as Solaris and SCO OpenServer. A system running this print architecture could tradi ...
command and the lpr
Berkeley printing system {{Unreferenced, date=March 2010
The Berkeley printing system is one of several standard architectures for printing on the Unix platform. It originated in 2.10BSD, and is used in BSD derivatives such as FreeBSD, NetBSD, OpenBSD, and DragonFly BSD. ...
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 port
A port is a maritime facility comprising one or more wharves or loading areas, where ships load and discharge cargo and passengers. Although usually situated on a sea coast or estuary, ports can also be found far inland, such as ...
631. 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
GNOME Core Applications is a software suite of approximately 30 application software that are packaged as part of the standard free and open-source GNOME desktop environment. GNOME Core Applications have the look and feel of the GNOME desktop, a ...
. The GUI can add CUPS printers and manage CUPS printers and queues. Before GNOME 3, the GNOME Print Settings (formerly called CUPS Manager) were used to perform these tasks.
GNOME's widget toolkit
A widget toolkit, widget library, GUI toolkit, or UX library is a library or a collection of libraries containing a set of graphical control elements (called ''widgets'') used to construct the graphical user interface (GUI) of programs.
Most wid ...
GTK+
GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and prop ...
included integrated printing support based on CUPS in its version 2.10, released in 2006.
KDE
The KDEPrint framework for KDE
KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that allow collaborative work on this kind of software. Well-known products include the ...
contains various GUI
The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
tools that act as CUPS front ends and allows the administration of classes, print queues and print jobs; it includes a printer wizard to assist with adding new printers amongst other features. KDEPrint first appeared in KDE 2.2.
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. ''kprinter'', a dialogue-box program, serves as the main tool for sending jobs to the print device; it can also be started from the command line
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
. KDEPrint includes a system to pre-filter any jobs before they are handed over to CUPS, or to handle jobs all on its own, such as converting files to PDF
Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
. These filters are described by a pair of Desktop/XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. ...
files.
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 System Preferences
System Settings (System Preferences on macOS Monterey and earlier) is an application included with macOS. It allows users to modify various system settings, which are divided into separate Preference Panes. The System Settings application wa ...
, and in printer proxy applications which display the print queues and allow additional configuration after printers are set up. Earlier versions of Mac OS X also included a Printer Setup Utility
The Printer Setup Utility was an application in Mac OS X that served to allow the user to configure printers physically connected to the computer, or connected via a network. The Utility provided more specific tools than the more user friendly ...
, which supplied configuration options missing from earlier versions of the Print & Fax preference pane.
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. the PrinterSetup project remains in its infancy.
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
A context menu (also called contextual, shortcut, and pop up or pop-up menu) is a menu in a graphical user interface (GUI) that appears upon user interaction, such as a right-click mouse operation. A context menu offers a limited set of choic ...
that pops up when the printer icon is right-clicked.
Eric Raymond
The given name Eric, Erich, Erikk, Erik, Erick, or Eirik is derived from the Old Norse name ''Eiríkr'' (or ''Eríkr'' in Old East Norse due to monophthongization).
The first element, ''ei-'' may be derived from the older Proto-Norse ''* ai ...
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
HP Jetdirect is the name of a technology sold by Hewlett-Packard that allows computer printers to be directly attached to a Local Area Network. The "Jetdirect" designation covers a range of models from the external 1 and 3 port parallel print se ...
. 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:
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
Easy Software Products was the vendor who originally invented the Common Unix Printing System (CUPS) and HTMLDOC software. It was founded near Washington, D.C. in 1993Michael R. Sweet, "CUPS: Common UNIX Printing System"The Evolution of CUPS. '' ...
, the original creators of CUPS, created a GUI, provided support for many printers and implemented a PostScript RIP
Rest in peace (RIP), a phrase from the Latin (), is sometimes used in traditional Christian services and prayers, such as in the Catholic, Lutheran, Anglican, and Methodist denominations, to wish the soul of a decedent eternal rest and peac ...
. ESP Print Pro ran on Windows, UNIX and Linux, but is no longer available and support for this product ended on December 31, 2007.
See also
* Foomatic
Foomatic is a configurable printing filter. It uses PPD files as configuration to generate appropriate output for a given printer. It is spooler independent which means it can be used with Common Unix Printing System (CUPS), LPRng and others. ...
* Gutenprint
Gutenprint (formerly Gimp-Print) is a collection of free-software printer drivers for use with UNIX spooling systems, such as CUPS, lpr and LPRng. These drivers provide printing services for Unix-like systems (including Linux and macOS), RISC OS ...
* HP Linux Imaging and Printing
* Lp (Unix) The printing subsystem of UNIX System V is one of several standardized systems for printing on Unix, and is typical of commercial System V-based Unix versions such as Solaris and SCO OpenServer. A system running this print architecture could tra ...
* LPRng LPRng is a printing system compatible with the Berkeley printing system. It provides printer spooling and network print server functionality using the Line Printer Daemon protocol.
It is an open-source project hosted on SourceForge and implemented ...
* Scanner Access Now Easy
* Spooling
In computing, spooling is a specialized form of multi-programming for the purpose of copying data between different devices. In contemporary systems, it is usually used for mediating between a computer application and a slow peripheral, such as ...
* Xprint Xprint is a deprecated printing extension for the X Window System. It allows an application to render output to a printer just as it would to any other display device. The server portion, ''Xprt'', uses an extension (''XpExtension'') to handle paged ...
References
Further reading
Design of CUPS Filtering System — including the context for Mac OS X ("Jaguar")
''LinuxPrinting.org''. Retrieved January 5, 2005.
* KDE
KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that allow collaborative work on this kind of software. Well-known products include the ...
.
KDEPrint information
'. KDE-printing website. Retrieved January 14, 2005.
How to Manage Printers in Linux
Linux.com, 2015-04-27.
External links
*
OpenPrinting
Universal Plug and Play – Printer Device V 1.0 and Printer Basic Service V 1.0
{{DEFAULTSORT:Cups
1999 software
Apple Inc. acquisitions
Apple Inc. software
Computer printing
Device drivers
Free PDF software
Free software programmed in C
Unix network-related software
Software using the Apache license