Taming the Horrors of Printers and Printing, Part 4
Hello everyone, and welcome back to Sysadmin's Corner, where nothing is impossible and system administration can even be fun.
For those who are new to Linux, one of the most difficult things to wrap your head around is the idea of choice. Oh, sure, you can get lots of different word processing packages for Windows and for Linux. The difference is that with Linux, doing things differently goes right down to the bone. I can rebuild my kernel to take advantage of little-known, super-cool performance enhancements. I can change the way I talk to every device hooked up to my system. I can even decide how I want to print. One gives you choices, the other gives you CHOICES! That's not always easy for the new Linux user to get used to.
Printing is what we are talking about, and this is where I will turn this analogy. If you are running Windows, you simply do your Settings-Printers thing and away you go. Along comes Linux, which says, "Well, you could print using the standard lpd system, or LPRng, or IPP, or CUPS, or PDQ. Oh, and you can use Red Hat filters, and custom bash filters, and ghostscript filters, and..." Choice is a hard thing to get used to, but once you do get the hang of options, they become an addiction that's good for you and good for the software industry as a whole.
Last week, I said I would re-visit filters one more time. That's only partly true, in that some of the things I want to talk about aren't specifically filters, and that whole choice thing has me rethinking things all the time. Some of you sent me thank-you e-mails for giving your HP 7xx series printers a second chance on your Linux server. A couple of people even said this "WinPrinter" problem was the last holdout to them switching entirely over to Linux. Hey, I'm just a force for good in my time. (Should I include a smiley here? Nah.)
People talk about getting "stuck" or "caught" with a printer that doesn't work. When I bought my HP710C printer, I just assumed (ouch!) that anything from HP would work with Linux. After all, they make that great OS, HP-UX. It's easy to be wrong. If you find yourself looking at a new printer and wondering whether it is a good idea for your Linux system, there's the ever-popular hardware compatibility list, but for printers, it gets better. Check out Grant Taylor's printer compatibility list at http://www.picante.com/~gtaylor/pht/printer_list.cgi.
Scroll down to the bottom of this page, and you'll find one of the coolest things about Grant's resource. For instance, you can select a particular manufacturer and get a list of all printers made by them, what level of support they offer, and what you might need to do to make them work. This is a good thing if you already have a particular printer and you want to know what filter or drivers are out there for your Linux system. Let's pretend I have a Canon BJC2000 series printer, and I want to know whether it would work. By choosing "all printers made by Canon" and clicking on "Go", the next page would tell me that the BJC2000 works "almost perfectly". If I click on the link representing the printer itself, I get even more information. In fact, the detail page tells me that my best bet with this printer, using ghostscript, is with this device option:
The less adventurous (who haven't already spent the money on a printer) can use the safer reporting option on the first page. Simply ask to see which color inkjet printers (or laser printers or whatever) work perfectly. The resulting report lists these printers by manufacturer, with appropriate links to detailed descriptions of individual models.
I want to go back to this whole idea of choosing your print system (and, in effect, the filters). One of the coolest printing options I've run across is something called PDQ. According to the author, Jacob A. Langford, it stands for "print, don't queue" and a variety of other acronyms. His page is at http://feynman.tam.uiuc.edu/pdq/.
PDQ is a nice, friendly little package that works on Linux and a variety of other UNIX systems. I'm not sure I agree a hundred percent with Jacob's reasoning on printing, accounting and queueing, but that doesn't detract from PDQ's value. While it seems quite capable of dealing with large deployments of printers, what I particularly like about PDQ is that it presents the kind of friendly face which users of that other operating system find so appealing, complete with a slick X-Windows-like interface and "wizards" to help you set up your printers quickly and easily. You can even use Grant Taylor's compatibility list to find the latest PDQ drivers and filters in his PDQ-O-Matic section.
Downloading the PDQ source and installing is easy. The latest release at this time is pdq-2.1.2. All I had to do was untar and unzip, then do a make. followed by a make install. Like this:
tar -xzvf pdq-2.1.2.tgz cd pdq-2.1.2 make make install
Now set up a base printrc configuration file, like this:
mv /etc/pdq/printrc.example /etc/pdq/printrc
To start PDQ and configure your first printer, simply type this command:
When the interface comes up, click on "Printer", then choose "Add" and follow the steps in the printer wizard. When you move your mouse over a field, PDQ also has context-sensitive "bubble" help to guide you.
When you get the driver selection screen, you may find that list somewhat limited--only about a dozen printers are listed, although you may be able to use a generic definition. For my HP LaserJet 5L, I went back to Grant Taylor's printer compatibility list, found my printer, and clicked on the PDQ-O-Matic list. To install this new driver, I did the following:
In the drivers directory, there are subdirectories for the printer classes (or brands, if you prefer). After changing to the hp directory, I used vi (you can use emacs, pico, or whatever editor you prefer) and simply cut and pasted the information on the PDQ-O-Matic screen. Then I restarted xpdq, and my printer was now in the list.
To print a job using PDQ, you send the job via the command line (did I mention there are command-line utilities that let you do what the X interface does?). The format is simple. For my test, I even sent a Postscript file. I wanted to see PDQ's drivers and filters in action.
pdq -P hp5lj /tmp/oneliners.ps
The -P flag calls the printer name as you defined it in the wizard, while /tmp/oneliners.ps is my very important print file. The X interface (xpdq) then reports the status of the job, and even allows me the opportunity to reprint it, get a status on it (if it is deep in the list of jobs) or get information on the type of job.
Another alternative to good old-fashioned lpd printing is CUPS. CUPS, or the Common Unix Print System, is designed to be a platform-independent printing system that works across many different UNIXes (or Unices, if you prefer). The company which produces CUPS (Easy Software Products) distributes it under the GPL, but you should be aware that the number of print drivers is limited. For large printer support, you should consider their ESP Print Pro, a commercial offering which includes CUPS, lots and lots of printer drivers and a really cool GUI. If you want to explore CUPS, follow this link: http://www.easysw.com
CUPS uses the Internet Printing Protocol (IPP), a next-generation printing system aimed at replacing LPD with a "universal" printing environment, where any user anywhere could print to any printer anywhere. It also aims to provide better authentication and security. The proposed standard would even allow for encrypted print jobs. Those who are really curious as to where this is going can visit the Printer Working Group at http://www.pwg.org.
As I mentioned, CUPS has limited printer support in its free package; however, some popular printers are supported. If you want to go this route but prefer to stick to the freeware version (and you may use the provided drivers), you can still get a nice GUI by running KDE as your desktop. Just get your hands on KUPS from cuendet, available at http://cups.sourceforge.net.
There you have it. Despite rumors to the contrary, there are ways to simplify printing and make it more (ahem) Windows-like in friendliness. Your basic lpd printing and ghostscript are still important, in that you will find them on every Linux system you install. Red Hat print filters won't necessarily be there, and neither will somebody else's printing method. Many of the alternatives employ these standards, so knowing what's under the hood does not hurt.
So, that's it. I've gone on long enough for this week. Electrons don't come cheap, you know! Until next time, "Print lightly and carry a big toner cartridge."
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released
- SourceClear Open
- Parsing an RSS News Feed with a Bash Script
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide