Printing
Master printing in Linux
Unlucky Nick Peers has to untangle a cornucopia of acronyms to reveal how to get his printer working at its best and in full colour!
CUPS
Credit: https://openprinting.github.io
OUR EXPERT
Nick Peers has gone through more printers than he cares to remember. Despite his best efforts, though, he’s yet to find one that wouldn’t work with Linux.
QUICK TIP
You can administer certain aspects of CUPS from your web browser (go to localhost:631 to do so). It’s not as comprehensive as the options built into your distro and is best used on servers where no desktop interface is available for use. When prompted for access to certain areas, enter your Linux username and password.
Printers and Linux have never been the most comfortable of bedfellows. For decades, we’ve relied on the CUPS print server to manage printers (and printing), and there have been times when getting your printer set up has been a real struggle. Even now, despite the huge changes going on under the hood of CUPS, there are times when your printer doesn’t do what you want.
We’re going to explore how CUPS works – including the various ways to get your printer successfully set up – as well as look at ways in which you can exert more control over your printer to produce better looking and more consistent printouts. But first, a quick refresher.
CUPS – not the devil incarnate
CUPS stands for Common Unix Printing System, and has long been used to manage print jobs, queues and even provide support for network printing. In the early days, it relied on PPD (Postscript Printer Definition) files to communicate with printers, which meant having access to the right PPD for your specific printer model.
The emergence of the Internet Printing Protocol (IPP) has – in theory – simplified this task. IPP is an agreed standard that underpins various driverless technologies, such as AirPrint, and Wi-Fi Direct, and is found in 98% of printers sold today.
If your printers are relatively new – say 2010 or later – there’s a very good chance they support IPP, which means that as soon as you connect to your printer for the first time – either via USB or over the network – it should magically appear in the Printer settings dialog in your distro (switch it on if this isn’t the case).
IPP works in most cases but it’s a not a magic bullet. Even assuming your printer is detected, you can’t access the full range of its capabilities. That’s why many printers are still shipped with dedicated Linux drivers (which include the all-important PPD files to link up with CUPS) to unlock more of their capabilities. However, it does mean that if you have an IPP printer that the manufacturer hasn’t provided Linux support for, it should still be at least partially usable with CUPS.
When you print via CUPS, documents are converted to a format compatible with the printer. In the past, this was plain text or PostScript, the latter allowing formatted documents and images to be printed correctly. PostScript has been replaced by PDF, so now all print jobs are processed using this as a ‘filter’. CUPs has undergone some radical changes over the years – indeed, from February 2007 until 2019, the source code was owned and developed by Apple for its own Unix-based OS X operating system, with OpenPrinting (https://openprinting.github.io) given the tasks of maintaining the code for Linux.