Hack25.Configure Linux Connections to Remote CUPS Printers


Hack 25. Configure Linux Connections to Remote CUPS Printers

Quickly set up connections to remote printers using the CUPS web-based interface.

It would be nice if each user had her own printer, so we could all avoid the inherent bottlenecks caused when some thoughtless user prints a 100-page manual or a bunch of high-resolution vacation photos to one of your school's or company's central printers. Unfortunately, the purchase and maintenance costs of high-volume printers can be quite high, so most schools and businesses concentrate resources on one or two good ones and configure all their desktop systems to send print jobs to those printers. Luckily, the web-based administrative interface provided by CUPS makes it quite simple to configure and test connections to remote CUPS printers on Linux systems. Here's how.

3.7.1. Defining a Remote Printer in CUPS

The basic procedure for defining the remote printer is almost identical to that for creating the CUPS print server [Hack #24], so I won't insult your intelligence by duplicating screenshots and instructions here. Instead, I'll just focus on the two screens that are different and that really matter: the Device screen, where you specify how to connect to the printer; and a new Device URL screen, where you specify the Universal Resource Locator (URL) that uniquely identifies the remote printer.

After authenticating and beginning the process of adding a printer, you'll need to specify the protocol with which your client system will communicate with the remote printer. This is done on the Device screen, shown in Figure 3-9. Instead of selecting a physical connection, you'll usually select the Internet Printing Protocol (IPP). IPP is a modern protocol for communicating with printers from many different types of operating systems, and it is therefore the right choice in most modern, mixed-system environments.

Once you've selected IPP, click Continue to proceed to another Device screen, shown in Figure 3-10. This screen enables you to specify the URL of the remote printer so that the local system knows where to find the correct printer.

As shown in Figure 3-10, the URL of remote CUPS printer is in the form ipp://address-or-name/printers/printer-name, where address-or-name is the IP address or name of the host to which the printer is physically attached, and printer-name is the name of that printer on the remote host. The URL shown in this figure reflects the print server that I defined in "Create a CUPS Print Server" [Hack #24], which is named epson-color200 and is running on the host 192.168.6.64.

Figure 3-9. Specifying IPP as your remote printing protocol


Figure 3-10. Specifying the URL for your remote printer


Once you've specified the URL for the remote printer, proceed through the rest of the printer configuration screens [Hack #24]. You'll probably also want to print a test page to ensure that you can connect to the remote printer and verify that you selected the correct print driver to format output for the remote printer.

3.7.2. Summary

Configuring print access from any Linux system to a remote CUPS printer is quite easy, as you can see from the simple case explained in this hack. If you need to restrict access to this printer, you can manually modify the CUPS configuration file (/etc/cups/cupsd.conf) on the print server, as explained in "Define a Secure CUPS Printer" [Hack #28].

Using CUPS as the printing and queuing mechanism for your school or enterprise is the perfect solutionit gives you a powerful, consistent printing utility with a consistent administrative interface that is independent of different Linux distributions, thanks to its web-oriented focus.

3.7.3. See Also

  • http://www.cups.org/documentation.php

  • "Create a CUPS Print Server" [Hack #24]



Linux Server Hacks (Vol. 2)
BSD Sockets Programming from a Multi-Language Perspective (Programming Series)
ISBN: N/A
EAN: 2147483647
Year: 2003
Pages: 162
Authors: M. Tim Jones

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net