The Common UNIX Print Server (CUPS) is a fantastic (and inexpensive) way to serve up printers to users, departments, etc. With this server, you can count on reliable print jobs with low overhead. But for many, CUPS is unfamiliar territory, so they need a bit of help navigating the landscape.
Where do you start? How do you best manage a CUPS server? The following tips will help make your CUPS experience a smooth and simple one.
1: Make use of the Web interface
Point your Web browser to http://IP_TO_CUPS_SERVER:631 (where IP_TO_CUPS_SERVER is the IP address of your CUPS server) and you will find yourself at the CUPS Web management tool. This tool allows you to add/remove/edit printers, manage print spools, add/edit/remove print classes, view the printer logs, manually edit the printer, configure the server settings, and more. This tool is quite powerful and can make your CUPS management a much easier experience, while at the same time giving you for more control over your print server.
2: Share the printer out with GUI tools
The latest iterations of both GNOME and KDE provide a simple means of serving printers with the ease of a desktop GUI. If you don't want your print server to be a command line only machine (or headless machine), you should consider using these tools. From within the printer settings of the system-config-printer tool (click File | Server Settings), you can set the server to share out the printer. From the right-click menu (for the printer in question), make sure the Shared option is checked.
3: Check your Samba configuration
Samba is the main tool for sharing printers in a UNIX environment. Even when you're using GUI or Web-based tools to handle the configurations, the smb.conf configuration file is usually the target. Within the /etc/samba/smb.conf file, there are two sections in particular to examine: [printers] and [print$]. The [printers] section is the main section for configuring the Samba print share. The [print$] section is where you configure the location for Windows clients to download drivers for the printers.
4: Check log files for problems
When your print server has a problem, one of the first places you should check is the printer log file(s). If you look in the /var/log/cups directory, you will find the access_log, error_log, and page_log files. The access_log file will log any access attempt made on the server. This is a good place to start when trying to troubleshoot specific machine access to the print server. You will want to look for the machine's IP address within this log file. The error_log is exactly what it sounds like -- a log of CUPS errors. This will also log authentication failures. The CUPS page_log file lists each page that is sent to a printer and will contain the following information: printer user job-id date-time page-number num-copies job-billing job-originating-host-name job-name media sides.
5: Define and use classes
This is particularly useful if your CUPS server has numerous printers attached. A class is basically a way to determine what gets printed where. Classes also allow your print server to direct print jobs to available printers as well as allowing you to assign printers to different departments. Printer classes can be defined with the following information: Printer type, Department, and Location. CUPS always checks for an available printer. And when you have classes defined, CUPS will give priority in the order that printers were added to a class. So add the printer you want to have the highest priority to the class first. A printer class can also be a member of another printer class, thereby making classes even more flexible. In an organization with numerous printers, using classes will make the management of printers and print jobs much easier. Fortunately, you can manage classes from the CUPS Web interface, so you don't have to write to the CUPS config file directly.
Other CUPS tricks?
The CUPS print server is a great choice. Knowing how best to manage that print server can mean the difference between a smooth operating and a problematic setup. Use these five tips to keep that printer farm running as trouble-free as possible.
Do you have a CUPS trick you'd like to share? Have you come across an application that helps you manage your CUPS printers? Share with your fellow TechRepublic readers.
Jack Wallen is an award-winning writer for Techrepublic and Linux.com. As an avid promoter/user of the Linux OS, Jack tries to convert as many users to open source as possible. His current favorite flavor of Linux is Bodhi Linux (a melding of Ubuntu and Enlightenment). When Jack isn't writing about Linux he is hard at work on his other writing career -- writing about zombies, various killers, super heroes, and just about everything else he can manipulate between the folds of reality. You can find Jack's books on Amazon, Barnes & Noble, and Smashwords. Outnumbered in his house one male to two females and three humans to six felines, Jack maintains his sanity by riding his mountain bike and working on his next books. For more news about Jack Wallen, visit his website Get Jack'd.