Linux printer problems are some of the hardest to troubleshoot. The printer either gives you no error or something meaningless like “L32: Paper Jam” when there’s no paper jam. On the other hand, Linux just likes to say, “Printer Error: Printer Paused”. How do you fix these intractable problems? It turns out there’s a secret Linux printer interface that lets you toggle all sorts of advanced features.
As with so many other things, Unix pioneered network printing. When Linux cloned Unix, it inherited all of Unix’s printing software—and all of Unix’s printing quirks too.
Back when Unix was young, printers were much simpler devices than today’s multi-function inkjets and laser printers. Yesterday’s printers were all line printers—printers that printed one line of text at a time like a typewriter. Printing to a line printer was simple—Unix just sent a file to the printer and the printer did all the rest of the work.
Later people wanted to support more than one font. They also wanted graphics. So users replaced line printers with dot-matrix printers which were capable of printing almost anything with low-resolution—including fonts, bolding, underlining, graphics, big letters, little letters, borders, and much more.
Unix first began to have printing problems in the era of dot-matrix printers. Each printer manufacturer began to evolve their own language—and Unix had to learn how to speak each different language. Advancements in printer technology brought color and much higher resolution printers to market, but by that point almost no two printers spoke the same language.
Worse, for Unix and the then-new Linux, by this time Windows was the predominate operating system and few printer manufacturers attempted to include support for Unix in their printers. What Unix needed was a standard language that could describe pages and which would be easy to convert into the various printer languages.
The language that was chosen to fulfill that need was the first product designed by Adobe Systems when it was founded in 1982. It was called postscript and it’s still used on every Unix, Linux, and Mac OS X system today. Postscript is also the basis of the widely-used PDF file format.
Linux Printer Problems From Turning Postscript Into Printed Text
Every Linux program with a Print button generates postscript, but only about 10% of printers understand postscript directly (mostly business laser printers from Hewlett-Packard). So Linux needs to convert postscript into each printer’s specific language, a task for which it uses the Foomatic program.
Foomatic includes a database of over 3,400 printers as I write this (more are added every week). For each printer in its database, Foomatic has a special piece of code that can turn postscript into the language the printer speaks. Printers that speak good postscript need only a few lines of Foomatic code. Printers with weird languages require thousands of lines of Foomatic code—code that likely includes several bugs.
It would be too hard to teach every Linux program how to use Foomatic to turn postscript into printer language and then to tell each program what printer you use so it would use the right foomatic file. So, instead, a company wrote a program that accepts postscript files from programs on your computer, uses Foomatic to convert them, and then prints them using your printer.
The program calls itself the Common Unix Printing System (CUPS). Apple Inc. purchased it a few years ago and made it Mac OS X’s default print method. Default support in Apple has been a huge boon for Linux users—it means that many printer manufacturers provide Foomatic drivers for their printers so that they work on Mac OS X, which means the printers also work on Linux.
The Hidden Interface To Fix Linux Printer Problems
CUPS normally runs in the background, but it also has a hidden interface that any user on the computer can access. (But you will need to root password to change settings.) The interface runs on its own tiny Web server so you access it using your Web browser—on your Linux computer, go to the following URL:
(The above URL means, use the HTTP protocol (http://) to go to the host named localhost (an alias for the current computer) and access the Web server running on port 631—that’s the default port for CUPS.)
Once there, you probably want to click the Administration tab to troubleshoot and fix your Linux printer problems. If you have a printer job that’s stuck, you can click the Manage Jobs button to resume, cancel, or restart it. This is also where you’ll see additional information about what went wrong.
If you need to change a setting on your printer, click the Manage Printers button and Edit the printer you want to change. You can also print a test page from this screen.
If you try to change any printer or server settings, CUPS will ask you to login. The login name is root and the password is the root password. Ubuntu and other beginner-friendly Linux distributions don’t create a default root password, so you need to add one yourself using the following instructions:
- Make sure you’re logged in as an administrator account. Usually, the first account created on a computer is an administrator account.
- Open a terminal and type
sudo passwd root.
- Sudo will ask you for your user password. Enter it now.
- The program passwd will ask you to enter a new root password, enter it now. Choose a secure password—anyone who guesses your root password can control your whole computer and access any private files. After you type your password, the passwd program will ask you to type it again for confirmation.
- The passwd program will tell you that it’s updated the password successfully. This means you can now log in to CUPS using your new password.
Using CUPS Admin To Fix Printer Problems
On the printer Administration screen are two important buttons: Edit Configuration File and View Error Log. To find the details for your problem, view the error log. If there isn’t enough information there, you can change the log level by editing the configuration file—look for the setting labeled “LogLevel” and change it from warn to debug. Be sure to save your settings. Then all you need to do to fix your printer problems is check the log, find the error, and fix it.