Experiences with CUPS

CUPS

Image via Wikipedia

I have been running Common Unix Printing System(CUPS) for perhaps 10 years.  Prior to CUPS I used LPRng and simple LPD which are basic BSD variants for UNIX-like computing systems.

CUPS has become the defacto printing solution for Linux, I'm not exactly sure why it was chosen, but it certainly seems ubiquitous with most Linux distributions. Though CUPS was purchased by that Cupertino hardware company that I love to hate, it still gets widespread use.

Running CUPS can either be exhilarating or very humbling.
I still recall a time where a conducted a demo for WLUG and I failed miserably in my attempt to install and run CUPS within 15-20 minutes. Some other folks have also stubbed their knuckles and ranted about this software. Now that I am a bit wiser and more familiar with the print services here are a few pointers.

You'll need to understand the following

  • Hardware Compatibility
  • PPD files
  • Samba
  • Ghostscript 
  • Basic Networking
Before purchasing a printer be sure that it supports Linux. Typically most HP printers will work quite well. I have had good experiences with Brother printers too. If you do not take the time to verify that your printer works with Linux, you will most certainly become very frustrated.

At our small office we've used a Dell Color Laser 5110cn and Canon MF8350cdn multifunction laser printer. The latter released its printer drivers under the GPLv2. It took me awhile to find these drivers (PPD files).  As it turns out Canon released these drivers for Canon Japan, I stumbled upon them running a GOOG search.  A very helpful community run site is linuxprinting.org.  They have several hardware compatible drivers. I will one day add the CanonMF8350cdn to their list.

I'm not going to delve into PPD files. Suffice to say, they are essentially print drivers. While you do not need Samba to run a reliable print server with CUPS, Samba can help you with authentication and can also serve as a domain controller in a M$ windows environment.  In this particular case I used Samba to share the Canon multi-function printer as a resource to four windows clients.  The printer is attached to a Slackware 13.1 box that is serving as a print server.

A word about Samba...
Windows clients expect SMB/CIFS to be spoken over the network and Samba allows Unix-like systems to address this need rather easily. Shared network resources can be accessed and the appropriate handshaking authentication can take place. Samba handles the often used NT LAN Manager rather well. Nuff respect to hackers Andrew Tridgell and the rest of the Samba Project team. Samba is an indispensable networking tool on any heterogeneous network. 

Linux and Unix-like operating systems work best with printers that speak native postscript. I leave discovering the definition of postscript and its origin to the reader, as it is beyond the scope of this entry. However, I will state that you will need to install Ghostscript to successfully get printing to work on Linux, BSD and Unix systems. Basically, Ghostscript is software interpreter for postscript. In the cases where your printer may not speak native postscript, you can run Ghostscript to help fill in the missing bits that your Unix-like operating system expects.  Actually, most consumer grade printers inkjets do not speak postscript in the manner that the aforementioned operating systems expect.  Most laser printers speak some proprietary PCL. If you really wish to learn about the origins of postscript and the many variations of PCL. I'd highly recommend this paper, written by the author of the LPRng project, Patrick Powell. 

Lastly, you'll need to understand basic networking. As trivial as it sounds, you'll need to be able to ping each client in your network to be sure it can receive packets that originate from anyone on the LAN.  Once you've established good connectivity, the CUPS logs will become useful.

Below is a snippet of /var/log/cups/page_log

Note that 'nobody' is considered a guest account on the server. 

Canon_MF8300_Series_ 104 nobody [06/Jul/2011:17:36:06 -0400] 1 1 - 192.168.1.200 smbprn.00000072 Untitled - Notepad - -
Canon_MF8300_Series_ 105 nobody [06/Jul/2011:17:36:34 -0400] 1 1 - 192.168.1.200 smbprn.00000073 Untitled - Notepad - -

As an aside, I detected an annoying problem with "user" authentication within Samba.

For the moment, I'm forced to use the "share" security model.  The problem seems to originate from Win7 clients. I believe the issue is the NTLM. I seem to recall the fix deals with hacking the Windows Registry of the Win7 clients. 

In summary, CUPS is an ideal solution for printing on Unix-like systems. However, you must be sure to do upfront research to avoid purchasing the wrong type of printer.






  
  • links for 2007-02-12
  • Wonders of setgid
  • Foray into hardware virtualization - QEMU / KVM
  • OpenSSL and the TLS HeartBleed
  • Monthly Archives

    Pages

    OpenID accepted here Learn more about OpenID
    Powered by Movable Type 4.25

    About this Entry

    This page contains a single entry by AG published on August 27, 2011 10:00 PM.

    links for 2011-08-23 was the previous entry in this blog.

    2011 Ohio Linux Fest is the next entry in this blog.

    Find recent content on the main index or look in the archives to find all content.