Cups
Maintainer
Description
CUPS, the Common UNIX Printing System, is a modern printing system for all Unices. It's the printing system used in most (if not all) recent distributions of Linux and Mac OS X. This page lists some of the advantages offered by CUPS over the standard SME printing setup. Print from more computers on your network, including the SME Server itself
The standard SME printing setup didn't work for me. I have a deskjet attached to my SME Server and wanted to print to it from my Mac OS 9 computer and from the SME Server itself. Printing from the Mac resulted in a single line of PostScript code being printed and the printer locking up with the print job being stuck in the print spool. Printing text files from the SME Server resulted in a single line of text being printed, the printer locking up and the job getting stuck in the spool. Lots of printers have trouble with simple text files. Some don't even accept plain text input. Others need special formatting or require that you print to a particular queue on the printer.
The problem with the standard SME printing setup is that it only has raw queues, i.e. print queues that pass the input straight to the printer. When a PostScript print job is received from an AppleTalk client (AppleTalk clients need to send PS because all printers are exported as PS printers by the AppleTalk server), it will be passed on to the printer, regardless of whether that printer actually understands PS or not. When the input is a UNIX text file, it will go straight to the printer, regardless of whether that printer interprets line feeds literally, or expects carriage returns, or locks up if it doesn't get a form feed.
Besides being able to control raw print queues like the standard SME printing setup, CUPS has the ability to filter input if it needs to. This is how I can print many types of files (text, PostScript, PDF, tiff, png, jpeg, etc.) with a simple lp or lpr command from my SME Server. It also means that my Mac can send PostScript jobs to my deskjet. Yay, I can print now. Print to more types of printers, including SMB, AppleTalk, and PDF printers
CUPS has a modular design, for which many plugins are available. Quite a few plugins are included with CUPS, and there's a growing number of third-party plugins as well. Some of these plugins are filters: they add input filtering capabilities to the CUPS system. Examples of third-party filters are the native CUPS filters provided by the gimp-print printer driver distribution, and the foomatic-rip script from linuxprinting.org. Some of the plugins are backends: they provide the capability to print to particular printing devices (local, networked or virtual). CUPS comes with backends for printing to parallel, serial, USB, JetDirect/AppSocket, LPD, IPP, and SCSI printers, as well as the smbspool backend for printing to Windows printers through SAMBA. Available third-party backends include the backends provided by the gimp-print printer driver distribution, a Bluetooth backend, an ssh backend, a papclient backend for printing to AppleTalk printers, and the pdfdistiller backend for printing to PDF. Manage printers and print spools through a web interface
CUPS provides a web interface where you can track and control print jobs. You can hold jobs, release them, cancel them, restart them, get statistics about the time it took to print them, who submitted them, the size of the print jobs, etc. The CUPS web interface is also the easiest way to configure your printers. Serve Internet Printing Protocol clients
IPP, the Internet Printing Protocol, is a relatively new but widely supported standard for network printing. CUPS provides a client and server implementation for IPP/1.1, the latest version of the protocol. IPP client implementations are provided with all recent distributions of Unix, Linux, Mac OS X and Windows, and are available for download from MS for older versions of Windows.
The IPP network service is in addition to the print services offered by SAMBA and netatalk of course. The cups-lpd deamon can optionally be enabled as well to provide yet another network print service. Automatically share printers with other Linux/Unix hosts on your network
If you have other Linux/Unix hosts on your network that use CUPS for their printing system (halfway recent systems will) and all systems are set up right, they will automatically share their printers. Additional info
You can find more information about CUPS on the website http://www.cups.org/ and also on http://www.linuxprinting.org/.
Installation
Installing CUPS is not difficult and can easily be reversed. These instructions are for both installing and uninstalling CUPS.
- Remove e-smith-LPRng with yum yum remove e-smith-LPRng
- Add the 'rvandenaker-cups' repository to yum The following command will configure the RvandenAker repository on SME Server.
- Install cups and friends with yum
- <li="*">To install the CUPS printing system:
yum groupinstall cups --enablerepo=rvandenaker-cups
<li="*">To install the CUPS printing system and the PrintAnalyzer reporting tool:
yum groupinstall cups-printanalyzer --enablerepo=rvandenaker-cups
- Clean up and reboot. Run the post-upgrade event and reboot your server:
/sbin/e-smith/signal-event post-upgrade /sbin/e-smith/signal-event reboot
- install PrintAnalyzer (optional for those who picked option (a) in step 3) This step only applies to those who have completed steps 1 through 4, having picked option (a) in step 3, and then decide they want to install PrintAnalyzer! yum groupinstall cups-printanalyzer --enablerepo=rvandenaker-cups /sbin/e-smith/signal-event cups-upgrade
/sbin/e-smith/db yum_repositories set rvandenaker-cups repository \ Name 'R van den Aker CUPS repository' \ BaseURL 'http://mirror.contribs.org/contribs/rvandenaker/testing/smeserver-cups/repositories/7.0/' \ EnableGroups yes \ GPGCheck no \ Visible no \ status disabled
After adding it to the database we have to update the changes to the configuration file:
signal-event yum-modify
Uninstalling
- Use yum to remove cups and friends yum remove cups
- Install e-smith-LPRng with yum
yum install e-smith-LPRng
- Clean up and reboot. Run the post-upgrade event and reboot your server: /sbin/e-smith/signal-event post-upgrade /sbin/e-smith/signal-event reboot
Installing printers
There are two types of printers you can add to your CUPS configuration: raw printers and filtering printers.
Raw printers are 'dumb' devices that do nothing more than spit out what they're fed. If I feed my printer a UNIX text file, i.e. one without carriage returns, through a raw queue, it prints the first line of text, sometimes part of the second line of text indented to the end of the first line (no carriage return), and then it gets stuck until I remove the print job and the sheet of paper. If I feed it a PostScript file, it prints one or one and a half lines of PostScript code, etcetera. Your printer may be different. It may print UNIX text files correctly. But then again some printers don't accept text input at all. Or it may be a PS printer and print PostScript correctly. But then you'd have to make a second printer instance to print text to the printer's text queue, if it has one. And that's just ASCII text. Now try printing an image file or a non-ASCII text file to a raw printer queue. It will take a lot of file typing and converting and raster image processing, in other words all the work that a print filter is designed to do.
On the whole, raw printers (or printer queues, really) are not very useful if you want to print from the command line or from applications on your SME Server. Other hosts on your network may also be unable to print to raw printer queues. Raw printer queues are mainly useful for Windows computers on the network that have a Windows driver for the printer installed. The driver prepares the print job in a printer-ready format and the raw printer spits it out perfectly. You can also use a raw printer queue if you have another type of network host that can prepare print jobs in printer-ready format and has a way to connect to the raw printer queue.
A filtering printer queue is a 'smart' device that uses filters to convert the input it receives to a printer-ready format before sending it on to the printer device. CUPS converts most input to PostScript (some input is directly converted to the generic raster format), then from PostScript to a generic raster format using a so-called PostScript RIP (Raster Image Processor), and then to a printer-specific raster format using printer-specific raster filters. CUPS has built-in converters for text in several character sets and formats, a large variety of image formats, PDF, and PostScript (to clean up 'dirty' PostScript and insert page count information). A filtering printer can be fed many types of input files from the SME Server's command line. It can also be shared to all kinds of hosts on your network as a pseudo-PostScript printer, which is particularly useful for papd clients (papd is the netatalk print server), because they can only see PostScript printers.
Adding a filtering printer queue
- As discussed above, a filtering printer queue requires a filter to convert the input it receives to the kind of output that the printer understands. A conversion filter is one of the parts that make up a printer driver. A printer driver for CUPS consists of the following parts:
- A so-called PPD that specifies what conversion filter is to be used to produce printer-ready output and sets various options for the conversion filter. On RHEL/CentOS/SME Server systems CUPS PPD's are installed in /usr/share/cups/model/.
- A conversion filter that takes its input from one of the inbuilt CUPS filters and produces printer-ready output. Examples of this type of conversion filter are the inbuilt CUPS rastertohp and rastertoepson filters and the rastertoprinter filter from the Gimp-Print driver collection. On RHEL/CentOS/SME Server systems CUPS conversion filters are installed in /usr/lib/cups/filter/.
- Optionally a specialised CUPS backend that takes its input from the conversion filter and does some special handshaking with the physical printer if so required. Examples of this type of CUPS backend are the canon and epson backends from the Gimp-Print driver collection. On RHEL/CentOS/SME Server systems CUPS backends are installed in /usr/lib/cups/backend/. Most conversion filters will get their input from the inbuilt pstoraster filter, a filter that converts PostScript to a generic raster format. This filter requires a gs binary with the cups device built in. A suitable ghostscript package is provided and is installed with your cups package. If you only want to use the inbuilt CUPS printer drivers, that's all you need. However, most people will want to install additional printer drivers. To install additional drivers for the en locale (to have English-language PPD's installed) do (this assumes you have added the rvandenaker-cups repository to your yum configuration): yum install cups-drivers-en Alternatively, substitute "de", "es", or "fr" for "en" to have German, Spanish, or French-language PPD's installed.
- Access the CUPS web interface through the printers panel in the server-manager. Accessing it this way rather than directly has the advantage that you'll already be logged into the server-manager for "synchronizing the printer lists", which you need to do after adding or deleting printers through the CUPS web interface. Log on to the CUPS web interface as "admin".
- In the CUPS web interface, choose "Do Administration Tasks", then choose "Add a New Printer".
- Pick a name for your printer. "Location" and "Description" are optional. Please note that the "Location" entry is meant for descriptive information about the physical location of your printer, like "Printer room" or "Cupboard upstairs" or even "Honolulu" if you do remote printing. Press "Continue".
- Choose a device. The availability of devices depends on what so-called CUPS "backends" you have installed in /usr/lib/cups/backend/. Most standard devices come pre-installed with CUPS. I use the device "Parallel Port #1", because my printer is attached to the first parallel port. If you have a network printer with its own ethernet card or a dedicated print server device, please refer to this table for an overview of commonly used network interface settings. Press "Continue".
- Enter device settings. For some devices you'll be asked to enter device settings, such as baud rates for serial ports. If there are default settings, accept them. They will usually work. For network printers, you'll be asked to enter the device URI. If you're unsure which setting to choose from the table, you could try something like: socket://192.168.1.10 substituting your network printer's or print server device's IP address of course. Press "Continue".
- Choose a printer make. What makes and models you can choose from depends on the so-called CUPS PPD's (PostScript Printer Description files, also used for non-PostScript printers in CUPS) that you have installed in /usr/share/cups/model/. If you installed the drivers package, there should be quite a few models to choose from. If your printer model is not listed, please read the additional howto about adding a special type of PPD's known as Foomatic PPD's to your CUPS installation. I have a HP DeskJet 400, so I would choose "HP" here. Press "Continue".
- Choose a printer model. For my HP DeskJet 400 I can choose between a generic HP DeskJet Series model as supported by an inbuilt CUPS filter or the HP DeskJet 400 model as supported by Gimp-Print. Press "Continue".
- The printer should have been created successfully. You can follow the offered link to the printer page and print a test page if you like.
- You may also want (or need!) to choose "Configure Printer" on the CUPS printer page for your printer to set some options and adjust the driver settings. For example, you will need to change the printer configuration from the default if the driver expects a color cartridge but you only have the black cartridge installed.
- Now click the "Printers" link in the server-manager's left frame. The printer panel should say that your "Printer lists are out of sync". Click the "Synchronize" button to synchronize your printer lists. You should get a screen that says that the printer lists were successfully synchronized. If you now reload the printers panel by clicking "Printers" in the left frame again, the panel should say that your "Printer lists are in sync". This means that the newly added printer is being shared to your network computers through samba and papd. It's also accessible to IPP (Internet Printing Protocol) clients on your network.
Adding a raw printer queue
- Access the CUPS web interface through the printers panel in the server-manager. Accessing it this way rather than directly has the advantage that you'll already be logged into the server-manager for "synchronizing the printer lists", which you need to do after adding or deleting printers through the CUPS web interface. Log on to the CUPS web interface as "admin".
- In the CUPS web interface, choose "Do Administration Tasks", then choose "Add a New Printer".
- Pick a name for your printer. "Location" and "Description" are optional. Please note that the "Location" entry is meant for descriptive information about the physical location of your printer, like "Printer room" or "Cupboard upstairs" or even "Honolulu" if you do remote printing. Press "Continue".
- Choose a device. The availability of devices depends on what so-called CUPS "backends" you have installed in /usr/lib/cups/backend/. Most standard devices come pre-installed with CUPS. I use the device "Parallel Port #1", because my printer is attached to the first parallel port. If you have a network printer with its own ethernet card or a dedicated print server device, please refer to this table for an overview of commonly used network interface settings. Press "Continue".
- Enter device settings. For some devices you'll be asked to enter device settings, such as baud rates for serial ports. If there are default settings, accept them. They will usually work. For network printers, you'll be asked to enter the device URI. If you're unsure which setting to choose from the table, you could try something like: socket://192.168.1.10 substituting your network printer's or print server device's IP address of course. Press "Continue".
- Choose Model/Driver Make "Raw". Press "Continue".
- Accept Model/Driver Model "Raw Queue (en)". Press "Continue".
- The printer should have been created successfully. You can follow the offered link to the printer page if you like. Please note that printing a test page will fail on non-PostScript printers. This is because you're sending a PostScript test page to the printer raw.
- Now click the "Printers" link in the server-manager's left frame. The printer panel should say that your "Printer lists are out of sync". Click the "Synchronize" button to synchronize your printer lists. You should get a screen that says that the printer lists were successfully synchronized. If you now reload the printers panel by clicking "Printers" in the left frame again, the panel should say that your "Printer lists are in sync". This means that the newly added printer is being shared to your network computers through samba and papd. It's also accessible to IPP (Internet Printing Protocol) clients on your network.
Adding a Foomatic PPD to your CUPS installation
The (optional) foomatic-filters package includes the foomatic-rip filter script from the www.linuxprinting.org website. This script is a clever hack to allow the use of 'traditional' ghostscript devices with CUPS. Some background information about foomatic-rip, its use of traditional ghostscript devices, and how these differ from the special "cups" ghostscript device, can be found on this page. Native CUPS printer filters do not use any of the traditional ghostscript devices; they only use the special "cups" ghostscript device. However, very few driver distributions provide native CUPS filters, and the foomatic-rip trick comes in handy in many cases. An excellent driver distribution that does provide native CUPS filters and accompanying PPDs for hundreds of printer models is Gimp-Print. If you installed the gimp-print-cups package, chances are that your printer is supported by it. Your printer may also be supported by one of the 'sample' CUPS drivers included in the cups package. If your printer is not supported by either of these driver packages, you may yet be able to find a Foomatic PPD for your printer. So what are those Foomatic PPDs? PPDs and the CUPS filtering chain
PPDs are PostScript Printer Description files. The PPD specification was originally developed as an interface to control printer options for PostScript printers, but in CUPS they are used for all types of printers. If you want more background about the CUPS filtering chain and its use of PPDs, read this article. The gist is that PPDs determine the route that print jobs take through the CUPS filtering chain, most importantly the RIP filter to be used. This can be either one of the native CUPS filters or foomatic-rip. All the different native CUPS filters (controlled by PPDs for hundreds of different printer models) require only one ghostscript device: the special "cups" device. The foomatic-rip filter does not use the "cups" ghostscript device. It uses 'traditional' ghostscript devices such as "cdj500", "pcl3", "ijs", etcetera instead. Different PPDs that use foomatic-rip often require different ghostscript devices. Printer drivers, ghostscript devices and external ghostscript filters
In the olden days, every printer driver was a separate ghostscript device. This meant you had to recompile ghostscript for every new printer driver. A newer method is to have a common ghostscript device call an external program (also called a filter; distinct from CUPS filters), which controls the printer options for the different models supported by the filter. This means you do not need to recompile ghostscript every time a new printer model comes out; you just update the external filter program. One of these external ghostscript filters is "hpijs". It can be used in tandem with either the (oldish) "hpijs" ghostscript device or the (new) "ijs" ghostscript device. Foomatic PPDs for the hpijs ghostscript filter are provided by the hpijs-ppds package and will already be installed and available for selection in the CUPS web interface if you installed that package. Other Foomatic PPDs need to be downloaded from the www.linuxprinting.org website and installed according to the instructions below. Example installation of a Foomatic PPD
In this example we'll locate, download, and install a Foomatic PPD for my HP DeskJet 400. This printer -- like almost all HP printers -- is already supported by one of the 'sample' CUPS filters and by Gimp-Print, which I also have installed, so I do not strictly need a Foomatic PPD to use this printer. In addition, if I want to use a Foomatic PPD, the Foomatic PPD for hpijs for this printer was already installed by the hpijs-ppds package, so I can use the hpijs driver (the recommended driver for this printer, as we shall see) right away. However, I'll add another Foomatic PPD for my printer for the sake of the example.
- locate the Foomatic PPD for your printer model Go to www.linuxprinting.org and choose "Printer Listings" under "The Database", or go there directly by following this link. I choose the HP DeskJet 400, which takes me to this page. As you can see, there are many drivers to choose from for my printer: hpijs, cdj500, hpdj, pcl3, stp, hpijs-rss, gimp-print, and gimp-print-ijs. We can quickly discard three of these: stp is the old 'traditional' ghostscript device from the Gimp-Print distribution; gimp-print is the new "stp" ghostscript device; gimp-print-ijs is the external ghostscript filter from the Gimp-Print distribution that uses the "ijs" ghostscript device. We're not going to use any of these: if we want a Gimp-Print driver, we'll use the native CUPS filters provided by the gimp-print-cups package. We can also discard hpijs-rss as an older, albeit patched, version of hpijs than the one we have installed, and hpdj as an older version of the pcl3 driver. This leaves us with three choices: hpijs, cdj500, and pcl3. hpijs is the recommended driver for the HP DeskJet 400 and we would normally download the PPD for hpijs, but since it was already installed by the hpijs package, we'll choose the cdj500 driver for this example. The page says that the type of the cdj500 driver is "Ghostscript". This means that you need to have the "cdj500" device compiled into ghostscript if you want to use the cdj500 PPD. To find out what devices were compiled into ghostscript, examine the output of the gs -h command (the "ghostscript" command executed with the "help" switch). You may want to pipe the output through "less" for easier reading ( gs -h |less ). Lucky for us, "cdj500" is listed, so we can use this PPD. The astute will have spotted the "pcl3" device, the "ijs" device, which is used by the hpijs ghostscript filter, and the "cups" device, which is used by the native CUPS filters, among the available devices.
- Download the Foomatic PPD for your printer model Click the "download PPD" link. If your browser has trouble setting a reasonable filename for the PPD, you can rename it after downloading to the name suggested in the PPD. The extension must be .ppd and the file must be world-readable.
- Install the Foomatic PPD for your printer model After downloading (and possibly renaming) the PPD, you need to put it in the right place. PPDs go in /usr/share/cups/model/. You can put it in a subdirectory if you prefer. You can also compress it with gzip if you like. I put the compressed PPD HP-DeskJet_400-cdj500.ppd.gz in the /usr/share/cups/model/foomatic-ppds/HP/ directory that was created by the hpijs package.
- Reload cupsd Next you need to reload cupsd (as root) to register the new PPD. /sbin/e-smith/service cupsd sighup
- add a printer that uses the new Foomatic PPD Finally you need to add a (filtering) printer that uses the new PPD, as explained in this howto. The PPD adds a new "model" to the CUPS web interface. The PPD that I installed in the example adds the "HP DeskJet 400, Foomatic + cdj500 (en)" model in the "Hewlett-Packard" category. I had to change some of the driver settings (this is done through the "Configure Printer" option on the printers page in the CUPS web interface) before I was able to successfully print a test page. The only "color mode" that worked with my black ink cartridge was "Floyd-Steinberg Gray". I was not pleased with the result of the test page: printing was dead slow and the output quality rather poor. I then installed the PPD for the "pcl3" driver, and that was much better, so I removed the printer that used the "cdj500" driver and kept the "pcl3" printer.
====Adding a PDF printer through the CUPS web interface There are two types of PDF printers you can add: a raw PDF printer and a filtering PDF printer.
Raw PDF printers only take PostScript as input; you can print to them through PostScript drivers from Windows, Mac OS, and other computers. A filtering PDF printer can take as many types of input, in addition to PostScript, as there are input-to-PostScript converters on the host system. CUPS has built-in converters for plain text, a large variety of image formats, PDF (not very useful in this case), and PostScript (to clean up 'dirty' PostScript). This allows the PDF printer to convert many types of input files to PDF straight from the SME Server's command line, while still being accessible through PostScript drivers from network computers as well.
I recommend the filtering PDF printer because it does everything the raw PDF printer does and then some.
Installing the pdfdistiller plugin
Either type of PDF printer requires the pdfdistiler plugin for CUPS. Install it with yum (this assumes you have added the 'rvandenaker-cups' repository to your yum configuration).
yum install cups-pdfdistiller ghostscript
Adding a filtering PDF printer
- Access the CUPS web interface through the printers panel in the server-manager. Accessing it this way rather than directly has the advantage that you'll already be logged into the server-manager for "synchronizing the printer lists", which you need to do after adding or deleting printers through the CUPS web interface. Log on to the CUPS web interface as "admin".
- In the CUPS web interface, choose "Do Administration Tasks", then choose "Add a New Printer".
- Pick a name for your printer. "Location" and "Description" are optional. Please note that the "Location" entry is meant for descriptive information about the physical location of your printer, like "Printer room" or "Cupboard upstairs" or even "Honolulu" if you do remote printing. In the case of a PDF printer there is no physical printer location and you can leave this empty. Press "Continue".
- Choose Device "PDF Writing". Press "Continue".
- For "Device URI" enter something like pdf:/home/e-smith/files/ibays/intranet/files/ This would write the PDF output to the "files" directory of the ibay "intranet". Press "Continue".
- Choose Model/Driver Make "Postscript". Press "Continue".
- Choose Model/Driver Model "Generic color postscript printer (en)". Press "Continue". The printer should have been created successfully. You can follow the offered link to the printer page and print a test page if you like. Output will go to your "Device URI" directory.
- You may also want to choose "Configure Printer" on the CUPS printer page for your PDF printer and set resolution to the maximum value.
- Now click the "Printers" link in the server-manager's left frame. The printer panel should say that your "Printer lists are out of sync". Click the "Synchronize" button to synchronize your printer lists. You should get a screen that says that the printer lists were successfully synchronized. If you now reload the printers panel by clicking "Printers" in the left frame again, the panel should say that your "Printer lists are in sync". This means that the newly added printer is being shared to your network computers through samba and papd. It's also accessible to IPP (Internet Printing Protocol) clients on your network.
Adding a raw PDF printer
- Access the CUPS web interface through the printers panel in the server-manager. Accessing it this way rather than directly has the advantage that you'll already be logged into the server-manager for "synchronizing the printer lists", which you need to do after adding or deleting printers through the CUPS web interface. Log on to the CUPS web interface as "admin".
- In the CUPS web interface, choose "Do Administration Tasks", then choose "Add a New Printer".
- Pick a name for your printer. "Location" and "Description" are optional. Please note that the "Location" entry is meant for descriptive information about the physical location of your printer, like "Printer room" or "Cupboard upstairs" or even "Honolulu" if you do remote printing. In the case of a PDF printer there is no physical printer location and you can leave this empty. Press "Continue".
- Choose Device "PDF Writing". Press "Continue".
- For "Device URI" enter something like pdf:/home/e-smith/files/ibays/intranet/files/ This would write the PDF output to the "files" directory of the ibay "intranet". Press "Continue".
- Choose Model/Driver Make "Raw". Press "Continue".
- Accept Model/Driver Model "Raw Queue (en)". Press "Continue".
- The printer should have been created successfully. You can follow the offered link to the printer page and print a test page if you like. Output will go to your "Device URI" directory.
- Now click the "Printers" link in the server-manager's left frame. The printer panel should say that your "Printer lists are out of sync". Click the "Synchronize" button to synchronize your printer lists. You should get a screen that says that the printer lists were successfully synchronized. If you now reload the printers panel by clicking "Printers" in the left frame again, the panel should say that your "Printer lists are in sync". This means that the newly added printer is being shared to your network computers through samba and papd. It's also accessible to IPP (Internet Printing Protocol) clients on your network.
Printing to raw CUPS queues from network hosts
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
- 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.
- 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.
- Repeat the previous step for all printers.
Printing from Windows 95/98/Me over IPP
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
- 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.
- Add your Mac's IP address to the TrustedHosts property for the cups entry in the configuration database as explained here.
- In the apple menu choose "System Preferences..." to open the System Preferences window.
- If it's not already selected choose the "Show All" icon.
- Under the hardware heading choose "Print & Fax" to open the Print & Fax window.
- On the printing tab click "Set Up Printers..." this will bring up the Printer List.
- Click the "Add" icon.
- In the dialog choose "IP Printing".
- In the "Printer Address" box enter the IP address or name of your SME Server eg. 192.168.0.1.
- In the "Queue Name" box enter the name of the required raw queue on the SME Server.
- Pick the Printer Model for example "EPSON" and a new list of the models will appear.
- Pick the correct model from the list.
- 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.
- 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.
- 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
- 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.
- In the apple menu choose "System Preferences..." to open the System Preferences window.
- If it's not already selected choose the "Show All" icon.
- Under the hardware heading choose "Print & Fax" to open the Print & Fax window.
- On the printing tab click "Set Up Printers..." this will bring up the Printer List.
- Click the "Add" icon.
- In the dialog choose "Windows Printing".
- Pick your SME Server's domain or workgroup from the selection list.
- Browse to server and choose the raw printer queue required.
- Pick the Printer Model for example "EPSON" and a new list of the models will appear.
- Pick the correct model from the list.
- 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.
Printing to filtering CUPS queues from network hosts
All filtering printer queues in CUPS accept PostScript as input. In fact, if the input is not PostScript, it will be converted to PostScript before being RIPped (put through a Raster Image Processor) to a printer-ready raster format if you have a non-PS printer, or sent straight to the printer if you have a PS printer. For practical purposes all filtering printer queues can be considered PostScript printers. This means you print to them through PostScript drivers. To control printer options you use PPD's (PostScript Printer Descriptions), just like you do with real PostScript printers. What follows are instructions to install and/or configure PS drivers and PPD's on a number of popular operating systems.
Printing to filtering queues from Linux (and other Unix) hosts works slightly differently. They can send the printable files straight to the remote filtering queue without pre-filtering them to PostScript locally.
Printing from Windows 95/98/Me through Samba
- Make sure that you've added at least one filtering queue and that you've "synchronized the printer lists" from the server-manager's printer panel.
- Download the "Adobe Universal PostScript Windows Driver Installer" or the "PostScript Printer Driver AdobePS x.x.x for Windows 95 and Windows 98" from this page (I prefer the latter, the former seems to ignore PPD options randomly). Keep the installer handy: you need to run it every time you wish to add a PostScript printer.
- Run the installer. When asked where the printer is, simply browse to the printer queue on your SME Server's Samba share. When asked where the PPD is, choose "Network" and temporarily map an unused drive letter to \\SERVERNAME\PRIMARY, then browse to files/cups-ppds on this drive. When the installer finishes, it asks whether you'd like to configure driver options. Say yes to this and change the "PostScript output format" on the "PostScript" tab from "PostScript (optimize for speed)" to "PostScript (optimize for portability - ADSC)".
- Repeat the previous step for all printers.
Printing from Windows 95/98/Me over IPP
- 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.
- Make sure that you've added at least one filtering queue and that you've "synchronized the printer lists" from the server-manager's printer panel.
- Download the "Adobe Universal PostScript Windows Driver Installer" or the "PostScript Printer Driver AdobePS x.x.x for Windows 95 and Windows 98" from this page (I prefer the latter, the former seems to ignore PPD options randomly). Keep the installer handy: you need to run it every time you wish to add a PostScript printer.
- Run the installer. When asked where the printer is, enter as the network path http://servername:631/printers/printername. When asked where the PPD is, choose "Network" and temporarily map an unused drive letter to \\SERVERNAME\PRIMARY, then browse to files/cups-ppds on this drive. When the installer finishes, it asks whether you'd like to configure driver options. Say yes to this and change the "PostScript output format" on the "PostScript" tab from "PostScript (optimize for speed)" to "PostScript (optimize for portability - ADSC)".
- Repeat the previous step for all printers.
Printing from Windows NT4/2000/XP through Samba
You can either install the Adobe PostScript driver and basically follow the instructions for the other Windows versions, or you can install the cups-samba package, which contains a free PostScript driver for Windows NT4/2000/XP from the makers of CUPS, and use the cupsaddsmb command as explained below. The cupsaddsmb command exports the PostScript driver from the cups-samba package and the PPD('s) associated with your filtering CUPS queues to the Samba printer drivers directory, making them available for semi-automatic download to Windows NT4/2000/XP hosts.
- Make sure that you've added at least one filtering queue and that you've "synchronized the printer lists" from the server-manager's printer panel.
- Install the cups-samba package, which provides a freely distributable PostScript driver for Windows NT4/2000/XP, with yum (this assumes you have added the 'rvandenaker-cups' repository to your yum configuration). yum install cups-samba
- Set "use client driver = no" in smb.conf through the UseClientDriver database property. db configuration setprop smb UseClientDriver no expand-template /etc/samba/smb.conf service smb restart
- Run cupsaddsmb from the root prompt to "export" your printers. You can export individual printers with the command line cupsaddsmb -U admin -v printer1 [printer2...printerX] or you can export all printers at once with the command line cupsaddsmb -U admin -v -a These command lines connect to the samba server as admin, so you need to supply the admin password when prompted.
- Printer setup on your Windows NT4/2000/XP hosts should now be a "Point 'n Print" affair. Just browse to a printer on your SME Server share, right click on it and select "Install..." or "Connect..." (depending on Windows version).
- Repeat the previous step for all printers.
Printing from Windows 2000/XP over IPP
Get the PostScript driver and PPD onto your Windows system by first installing the printer as a Samba printer following the instructions above, then change the printer port to http://servername:631/printers/printername.
Note that Microsoft does not seem to provide IPP software for Windows NT4. Some other companies do.
Printing from Mac OS Classic through netatalk
The PostScript driver in Classic Mac OS is called "LaserWriter 8". It loads most CUPS PPD's correctly, but chokes on Gimp-Print PPD's. Please see this thread] on the Gimp-Print support forum for a workaround.
- Make sure that you've added at least one filtering queue and that you've "synchronized the printer lists" from the server-manager's printer panel.
- On your Mac open the Chooser from the Apple menu, click "AppleShare" and connect to your SME Server. Choose the "Primary" share.
- In the "files" folder on "Primary" you'll find a folder called "cups-ppds", which contains the PPD's of all the printers you've configured in CUPS.
- Copy the PPD('s) of the printer(s) of your choice to System Folder:Extensions:Printer Descriptions.
- Go back to the Chooser and click "LaserWriter 8". Select each printer in turn and press the "Setup..." button in the Chooser pane. The printer will be automatically configured to use the PPD that you copied to the "Printer Descriptions" folder. The options that are specified in the CUPS PPD are now available as "Printer Specific Options" in Mac OS print dialogs.
Printing from Mac OS X over IPP
- Make sure that you've added at least one filtering queue and that you've "synchronized the printer lists" from the server-manager's printer panel.
- Add your Mac's IP address to the TrustedHosts property for the cups entry in the configuration database as explained here.
- The printers you configure on your SME Server now appear as "Shared Printers" in your Mac's print dialogs. No local configuration is required.
Printing from Linux over IPP without a local spooler
With this method your Linux host is an IPP client only and doesn't run any print spooler/server itself.
All the Linux IPP clients that I'm aware of use libcups, the IPP library from the CUPS software distribution. Unfortunately, most of these frontends do not expose all the functionality that is provided by libcups. In particular, the ability to specify a user name and server name is not provided by most frontends. Even the frontends that ship with the CUPS 1.1 distribution (the commands lp, lpr, cancel, lprm, lpstat, etc.) do not uniformly allow the user to specify a remote server and/or user name. This is a problem because the default configuration of the CUPS server on SME Server is to require authentication from all remote clients. You can work around this problem by adding the client system to the TrustedHosts in the SME Server's CUPS configuration. Possibly the problem can also be solved by using NIS to duplicate users between SME Server and client systems. Alternatively, you can use GtkLP or XPP, which AFAIK are the only libcups frontends that do allow users to specify remote server and user names. Of these two, GtkLP is the most mature application. Unfortunately, configuring your Linux desktop to use GtkLP consistently across all applications as the default printing client can be a bit of a challenge.
Here's an example of a client-only configuration with a standard Ubuntu desktop installation. Assume that SME Server is 192.168.0.1 and the Ubuntu system is 192.168.0.123.
- On the SME Server add the Ubuntu system to your TrustedHosts for cupsd: db configuration setprop cupsd TrustedHosts 192.168.0.123 signal-event cups-reconfigure
- On the Ubuntu system edit /etc/cups/client.conf and add the line: ServerName 192.168.0.1
- Optionally, you can stop the cupsys service on your Ubuntu system because there is no need to run a CUPS server on the client system.
Printing from Linux through a local CUPS spooler
In this configuration the local CUPS server hands print jobs to the remote CUPS server (the one running on your SME Server) through the 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 all that remains to be done is to ensure that the cupsd.conf for your local CUPS server contains the line "Browsing On" (or at least does not contain the line "Browsing Off" since "Browsing On" is the default). The CUPS server on your SME Server sends browse packets to all TrustedHosts. CUPS servers that receive browse packets will automatically add the remote printer queues to their list of available printers. No local configuration is required.
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 is how.
Additional information
There are two 'hidden properties' for the database key for cupsd in /home/e-smith/db/configuration, the master configuration file of your SME Server. With these properties you can change the behavior of the CUPS server from the default. Setting these properties makes CUPS a bit more 'permissive' than the default, so be careful when you use them.
In addition there is a database key for cups-lpd, a 'mini-server' for the Line Printer Daemon protocol.
The SystemGroup database property
The SystemGroup property corresponds to the SystemGroup directive in the CUPS server configuration file. The SystemGroup is the group of users who have administrative control over all print jobs in the job queue. Normally, users can only control their own jobs. SystemGroup members can control anyone's jobs, so be careful who you put in this group. Here's how to set the SystemGroup property:
- Make a new group through the "Groups" panel in the server-manager. For our example we'll use the group name "lpadmin". Don't make this group too inclusive.
- Set the SystemGroup property for the cupsd key in the configuration database. Example: /sbin/e-smith/db configuration setprop cupsd SystemGroup lpadmin
- Signal the cups-reconfigure event to reconfigure and restart CUPS: /sbin/e-smith/signal-event cups-reconfigure
The default SystemGroup is root.
The TrustedHosts database property
Network hosts that are added to the TrustedHosts setting receive browse packets from the CUPS server and their users can access the CUPS server without a password. See this section for a reason why you would want to do that. Here's how to set the TrustedHosts property:
- Set the TrustedHosts property for the cupsd entry in the configuration database. This must be a comma-separated list of IP addresses or a single IP address in dotted quad notation. These hosts must have a route to the local IP of your SME Server. The TrustedHosts should preferably have reserved/static DHCP leases. Example: /sbin/e-smith/db configuration setprop cupsd TrustedHosts 192.168.1.65,192.168.1.68,192.168.1.69
- Signal the cups-reconfigure event to reconfigure and restart CUPS: /sbin/e-smith/signal-event cups-reconfigure
By default there are no TrustedHosts.
The cups-lpd database key
The CUPS distribution includes a mini-server for the Line Printer Daemon protocol called cups-lpd. This can be enabled if you need to serve 'legacy' LPD clients. Note that cups-lpd does not use the access control settings in cupsd.conf nor does it have its own access control configuration like LPRng does in lpd.perms; instead access control is handled by tcpsvd. Here's how to enable cups-lpd:
- Enable the cups-lpd service in the configuration database: /sbin/e-smith/db configuration setprop cups-lpd status enabled
- Start the cups-lpd service: /sbin/e-smith/service cups-lpd start By default cups-lpd is disabled.
Bugs
Please report bugs to the maintainer of the contrib listed at the top as there is no category in the bugtracker for this contrib.