How to print to raw CUPS queues from network hosts?


Author: Robert van den Aker (robert2 AT dds DOT nl)
Contributors: Nigel Gent (Mac OS X section)
Version: 2005.12.18.0

Introduction

Printing to a raw CUPS queue is not much different than printing to a raw LPRng queue, so you probably already know how to do this. The following tips are provided for your convenience anyway.

Printing from Windows 95/98/Me/NT4/2000/XP through Samba

  1. Make sure that you've added at least one raw queue and that you've "synchronized the printer lists" from the server-manager's printer panel.
  2. Add a printer with the wizard. Feed driver disk when prompted (should have come with your printer or files and instructions may be available from printer vendor's website). Set the printer port to a raw queue on your SME Server's Samba share.
  3. Repeat the previous step for all printers.

Printing from Windows 95/98/Me over IPP

  1. Download the Internet Print Services client software from Microsoft's site and install it. For Windows 95 the download is on this page. For Windows 98 get the download from this page. Windows Me reportedly shipped with an IPP client in the Add-Ons folder on the CD-ROM. Alternatively, the Windows 98 client will probably work on Windows Me as well.
  2. Make sure that you've added at least one raw queue and that you've "synchronized the printer lists" from the server-manager's printer panel.
  3. Add a printer with the wizard. Feed driver disk when prompted (should have come with your printer or files and instructions may be available from printer vendor's website). Set the printer port to a raw CUPS queue. The URL for an IPP printer port is http://servername:631/printers/printername. For instance, my server's name is "alpha". I have a raw queue called "deskjet". The IPP printer port for this raw printer queue is http://alpha:631/printers/deskjet.
  4. Repeat the previous step for all printers.

Printing from Windows 2000/XP over IPP

Same as the other Windows versions, except that Windows 2000 and XP come with IPP client software pre-installed.

Note that Microsoft does not seem to provide IPP software for Windows NT4. Some other companies do.

Printing from Mac OS Classic through netatalk

All printers in your SME Server system are registered as "LaserWriter 8" printers by papd, the netatalk print server, and are available under that category in the Mac OS Chooser. The LaserWriter 8 extension is actually a PostScript driver and therefore you need a PostScript printer to make sense of its output.

  1. Make sure that you've added at least one raw queue and that you've "synchronized the printer lists" from the server-manager's printer panel.
  2. On your Mac open the Chooser from the Apple menu and click "LaserWriter 8". Select each printer in turn and press the "Setup..." button in the Chooser pane. You'll be prompted for a PPD (PostScript Printer Description) for you printer. Pick one of the pre-installed PPD's or feed the PPD that came with your PostScript printer.

Printing from Mac OS X over IPP

Note 1: this applies to the latest version of Mac OS X and may not apply to earlier versions.

Note 2: there is an easier way to print from Mac OS X.

  1. Make sure that you've added at least one raw queue and that you've "synchronized the printer lists" from the server-manager's printer panel.
  2. Add your Mac's IP address to the "TrustedHosts" property for the cups entry in the configuration database as explained here.
  3. In the apple menu choose "System Preferences..." to open the System Preferences window.
  4. If it's not already selected choose the "Show All" icon.
  5. Under the hardware heading choose "Print & Fax" to open the Print & Fax window.
  6. On the printing tab click "Set Up Printers..." this will bring up the Printer List.
  7. Click the "Add" icon.
  8. In the dialog choose "IP Printing".
  9. In the "Printer Address" box enter the IP address or name of your SME Server eg. 192.168.0.1.
  10. In the "Queue Name" box enter the name of the required raw queue on the SME Server.
  11. Pick the Printer Model for example "EPSON" and a new list of the models will appear.
  12. Pick the correct model from the list.
  13. Open a web browser on the Mac and go to http://127.0.0.1:631 to open the CUPS web interface on the Mac.
  14. Select the printer just added which will be called something like "<myprinter> on <mySMEserver>" and modify it changing the "ipp" in the middle of the URI to "printers" eg. "http://192.168.0.1/ipp/epson580" should be changed to "http://192.168.0.1/printers/epson580". Check and correct all fields as you go through the modify process as some seem to default to other than what you have just set up.
  15. If required select the line showing the newly added printer in the Printer List and click the "Make Default" icon.

Printing from Mac OS X through Samba

Note 1: this applies to the latest version of Mac OS X and may not apply to earlier versions.

Note 2: there is an easier way to print from Mac OS X.

  1. Make sure that you've added at least one raw queue and that you've "synchronized the printer lists" from the server-manager's printer panel.
  2. In the apple menu choose "System Preferences..." to open the System Preferences window.
  3. If it's not already selected choose the "Show All" icon.
  4. Under the hardware heading choose "Print & Fax" to open the Print & Fax window.
  5. On the printing tab click "Set Up Printers..." this will bring up the Printer List.
  6. Click the "Add" icon.
  7. In the dialog choose "Windows Printing".
  8. Pick your SME Server's domain or workgroup from the selection list.
  9. Browse to server and choose the raw printer queue required.
  10. Pick the Printer Model for example "EPSON" and a new list of the models will appear.
  11. Pick the correct model from the list.
  12. If required select the line showing the newly added printer in the Printer List and click the "Make Default" icon.

Printing from Linux over IPP without a local spooler

The printing part is easy, but the local input filtering --which you need to do if you want to print to a raw queue-- can be tricky without a local spooler to slap an input filter on. The easiest method, in my opinion, is to use foomatic-rip with the FoomaticRIPPostPipe option as explained here. Another option might be to use apsfilter's aps2file tool and print by piping its output to lp. Or you could construct your own x2ps |gs |lp commandlines. But really it's much easier to send your jobs to a filtering queue and let CUPS worry about the input filtering.

Printing from Linux through a local CUPS spooler

In this configuration the print job acceptance, filtering and spooling is done by the local CUPS server, with the remote CUPS server (the one running on your SME Server) acting as an IPP backend. This poses a problem for authentication. When the local server accepts a print job from the local client, it will try to submit the job to the remote backend "for" the submitting user, not "as" the submitting user. The local server can't authenticate to the remote backend for the local user. Of course, the local user could authenticate and print to the remote server directly by pointing his/her local CUPS client to the remote CUPS server, but if you want to print through the local CUPS server and use the remote CUPS server as an IPP backend I see no other solution than to disable password authentication for the selected host(s) that you want to print from in this manner. This is where the 'hidden' database property "TrustedHosts" comes in. Trusted hosts are allowed to connect to the CUPS server on SME Server without authentication. You trust these hosts to require logins and to have well-behaved users that use the lp command to submit print jobs, so that you'll at least know who the foreign printer users are.

With your local Linux host added to the TrustedHosts database property on the SME Server you make a filtering queue on your local CUPS server that uses a raw queue on the SME Server for the "Device". The URL for this device would be ipp://smeserver/printers/rawqueue. Note that you normally cannot use a filtering queue on the SME Server for this; filtering queues on the SME Server reject the raster output produced by most of the CUPS filters.

Printing from Linux through a local LPR spooler or standalone lpd client

CUPS provides the cups-lpd daemon for serving lpd clients. There is usually no need to enable this service, but in the rare case that your site does require it, here's how.


This document is Copyright 2003-2005 by Robert van den Aker. It may be freely redistributed in its entirety provided that this copyright notice is not removed.