CSD Common Unix Printing System (CUPS)

Introduction

Cups is based on the System V based commands. This includes lp, lpstat, lpoptions. This is different from our old system of BSD style lpr commands, but they are still supported. It is an implementation of the Internet Printing Protocol (IPP) which implements printing over already common and available web protocols. What this means for users is that it is easier to view and add printers for new operating systems without as much complexity.

Please note that this document is only meant to give a brief introduction to the new print system. If you want to understand more about the print system please refer to the documentation for CUPS located here http://printer.cs.umd.edu/documentation.html

To get started you can view the queues and learn more about IPP and cups by going to http://printer.cs.umd.edu . This will have sections like Administration, Online Help and Manage Printers. Some sections including everything under the http://printer.cs.umd.edu/admin section you will not be able to view as it will require logging in. This section is for staff to control the printers and classes. However the sections like the Online Help and Printers allow normal users to browse and see the available queues.

Changes

Besides the commands being different the next biggest difference is that there are no longer multiple queues for such things as no banners, simplex and the multipurpose trays.

These are now activated by passing options with the -o with then option=value. The reason for this is the expanded ability for a multitude of options. These include no banners, simplex, n-up printing, multiple copies and more.

Staff has also taken the precaution to protect our printers from rogue network traffic by quarantining the printers on their own vlan separate from all other machines. What this means is that you can not print directly to the printer through lpr or appletalk printing. The only way you can print is through the print server, which is now called printer.cs.umd.edu.

Public queues are available under the same name that they were before ps3 and ps4 along with the junkfood lab queue of ps3457. These queues are available for all cs users. There are then personal and lab printers that are restricted to certain users or groups of users. If you have a question whether or not you have permission to print to a queue please email staff@cs.umd.edu

Submitting a Job

Both lp and lpr are supported ways of queuing your job for printing. However it suggested you use lp because it is what cups was designed around. They both take very similar options under but the main difference between the two is that lp uses the -d printer as opposed to lpr taking -P printer. They both take the filename as the last argument on the command line or they accept the job as stdin. The real power is in the ability to give options on the command line that allow you control over how your job is printed.

The program that work with lp/lpr is lpoptions which sets instances of printers and default options that are specific to the user. These options are broken down into 4 different categories that are supported by CUPS filters directly.

There are also specific options that will be processed by the printer itself. You can get a list of options that the printer supports via its Postscript Printer Description (PPD) with lpoptions.

# lpoptions -p printer -l
Resolution/Output Resolution: 150dpi *300dpi 600dpi
Duplex/Double-Sided Printing: DuplexNoTumble *None DuplexTumble
PageSize/Media Size: A3 A4 A5 B5 Env10 EnvISOB5 EnvC5 EnvDL EnvMonarch Executive Legal *Letter Tabloid
InputSlot/Media Source: *Default Envelope Manual Tray1 Tray2 Tray3 Tray4
PageRegion/PageRegion: A3 A4 A5 B5 Env10 EnvISOB5 EnvC5 EnvDL EnvMonarch Executive Legal Letter Tabloid
Option1/Duplexer: True *False

The * denotes that is the default option that the printer has. These options can be changed with the -o command line switch. For example if you wanted to send a job that printed out in 600dpi instead of 300dpi to the printer you would run a command like: # lp -d printer -o Resolution=600dpi

lpoptions can also make a instance of a printer for the user so you can have an easy way to store multiple configurations for a single printer. When you create an instance for a printer or use lpoptions it will modify a file in your home directory called .lpoptions. This is where it stores all the options that you create. To create an instance of a printer you just give lpoptions the printer but append a / and a name and give it the options you want to associate with the instance. For example:


# lpoptions -p printer/noduplex -o Duplex=none

This creates an instance that you can then use as the printer name and get the options that you want without having to remember them every time you want print. You can now use the instance in your print commands like lp/lpr in place of the printer name.  Example if you wanted to print the test.ps file in the current directory:

# lp -d printer/noduplex test.ps

Note: you must use the whole instance name including the queue to print using your new setting eg. you have to use printer/noduplex and not just noduplex.

To set the default printer the lpoptions command of lpoptions -d printer can be run.

Managing Your Print Jobs

As before you can check the status of your print jobs with the new system. The CUPS normal way to check on your print jobs is through the lpstat command line utility. It takes many different options but without any options it will display the current queued jobs for that user. To find out more about what information that the lpstat command can tell you you can man lpstat on any supported UNIX machine.

The job-id is listed when queued with lp and can be ascertained by the first field that is returned on the line by lpstat. The job-id is is later half of of printer-number combination. For example:

# lpstat
Test-6 derek 8192 Sat Mar 30 18:31:53 2002
Test-7 derek 8192 Sat Mar 30 18:36:35 2002

This shows that the first job has the job-id of 6 and the second has job-id of 7.

To remove your print job you can use the BSD lprm or you can use the SYSV CUPS cancel. Cancel will take a destination which is a printer where it will dequeue the first job that belongs to the user. Cancel can also dequeue all jobs that belong to the user by giving a -a on the command line. It can also remove a certain job by using the job-id on the command line.

Graphical Print Spooler and Manager

If you would like a graphical interface to spooling and managing your jobs you can use /usr/local/bin/gtklp for spooling and /usr/local/bin/gtklpq for managing them.

For example under mozilla you can do this to setup mozilla to print using gtklp.

 unix print dialog

unix print properties

unix gtklp

You can use this under Solaris or Linux, and you should be able to setup other applications similarly to do the same.  Just when you have to put in a print command just put in /usr/local/bin/gtklp.

Printing from Windows

If printing from a supported Windows computer, our public printers (ps3, ps4, tek4180) should already be installed. If they are not or you would like another printer installed, please email staff@cs.umd.edu with the printer name and your computer name.

If printing from an unsupported Windows 2000/XP machine then the easiest way to print is through the built in IPP support. This can be done by clicking Add Printer under the Printers folder in the Control Panels. Select Network Printer and then select "Connect to a printer on the Internet or on your Intranet" where you can put in:

    http://printer.cs.umd.edu/printers/(printer)

Where (printer) is ps4, ps3, ps3457, etc..

Ps3 and ps4 have recently been upgraded to Canon imageRUNNER 3570s. To print to these from an unsupported Windows PC you will need the proper drivers. You can find the proper drivers either:

To configure your PC to use the ps3 or ps4 printers, perform the following steps:

  1. select Start -> printers and faxes for windows XP, or Start -> Settings -> Printers for Windows 2000.
  2. choose add a printer
  3. select network printer
  4. connect to the printer via http; select the third option and give it the URL http://printer.cs.umd.edu/printers/queue where queue is either ps3 or ps4.
  5. select canon from the left column. Then click on Have Disk
  6. if you downloaded the driver from our or Canon's website, browse to the directory you downloaded that file to.
  7. if you are using the driver on mulder, select, or browse to, \\mulder\pub\drivers\canon iR3570\win2k_xp
  8. the desired printer type is Canon iR3570/4570 PS3.

There are number of special printing options you can select.

Printing from other unsupported machines

When printing from other unsupported machines if using a UNIX style OS then you have three options. You can print through the existing BSD lpr printing if the OS has it. All you need is the printcap from a supported UNIX machine that resides in /etc/printcap. The second way is if the OS has a IPP printing system. Then you will able to be use the :

    http://printer.cs.umd.edu/printers/(printer)

Finally if none of the others are available, then you should go to http://www.cups.org and download the CUPS distribution. Follow the instructions to install and then you need to add to your (path to install)/etc/cups/client.conf the line :

    ServerName printer.cs.umd.edu

MacOS 9.x users you can use the print manager to add a BSD lpd printer, just enter the server printer.cs.umd.edu and the queue name. (eg. ps4, ps3, ps3457, etc...)

MacOS X users can use the print manager to setup the printers they want to access.  Find the Printer Setup Utility in /Applications/Utilities/Printer Setup Utility.

10.3 (Panther) and earlier: When you click Add Printer Hold down the Alt/Option Key to get the Advanced Properties (from the drop down selection).
10.4 (Tiger): Click on Add Printer, then hold the ALT key while clicking on "More Printers..." to get to the Advanced tab.

   
    Type of printing :     Advanced
    Printer Protocol :     Internet Printing Protocol using IPP
    Device Name      :     printqueue
    Device URI       :     ipp://printer.cs.umd.edu/printers/printqueue            <--- Where printqueue is ps3,ps4,ps3457, etc...
    Printer Model    :     see http://printer.cs.umd.edu/printers for information on Manufacture and Make of the printer you want
                               

To use the Canon imageRUNNER 3570s, e.g. ps3 and ps4, you will need to download a new ppd from Canon. The file can be found on this page. Note: the correct file is called IR-PPDv1.81_Mac_OSX_Installer.hgx. After you have installed the ppd, you will be able to select Canon->iR3570/4570 in the printer setup utility following the steps described above. To use ps3 and ps4 printers, configure a single printer called "ps3" or "ps4," and use this ppd. For example for ps3 you would put in the following:

       Type of printing :     Advanced
    Printer Protocol :     Internet Printing Protocol using IPP
    Device Name      :     ps3
    Device URI       :     ipp://printer.cs.umd.edu/printers/ps3
    Printer Model    :     HP
    Driver           :     iR3570/iR4570 Canon PS

Access to the Print Server

Please note that only machines in the .cs.umd.edu domain can print to the printers.  If you are not coming from a .cs.umd.edu ip then you will not be allowed access the print servers.  If you are on the UMD wireless network you must be running the VPN to access the print queues.