Mac
OS X offers a rich and flexible set of tools for administering and
using a wide variety of printers. Unix and Linux users will find
tools that are familiar, as well as a few new ones. In this chapter
we will first discuss basic use of the Printer Setup Utility found in
the /Applications/Utilities
folder. We will then
discuss the Mac OS X implementations of the printing tools most Unix
and Linux users will find familiar. In particular, we will discuss
the Common Unix Printing System (CUPS), GIMP-print, HP InkJet Server
(HPIJS), and Samba Printing.
If you’re using a popular USB printer under Mac OS X, it is likely that all you’ll need to do is connect it to the USB port and choose this printer in the Print dialog when you want to print a document. However, there are some circumstances where it’s not so simple:
Perhaps your USB printer does not automatically show up as an available printer in the Print dialog
Maybe you want to share your printer with other computers on your LAN
Perhaps you want to use a network printer such as one listed in Open Directory, an AppleTalk printer, or one for which all you have is an IP address
If you haven’t already set up a printer using the Printer Setup Utility, there are three ways to add a new printer in Mac OS X:
- Add a printer automatically
Attempting to print a document from virtually any application automatically launches the Printer Setup Utility: Mac OS X first informs you that you have no printers available, and asks if you’d like to add a printer. Click on the Add button to start the setup procedure.
- Launch Print Center
You can also add a new printer by double-clicking the Printer Setup Utility icon in the
/Applications/Utilities
folder and clicking the Add button. The/Applications/Utilities
folder also contains an icon for Print Center. In Panther, the Print Center is provided as an alias to Printer Setup Utility, to maintain backward compatibility with earlier versions of Mac OS X.- Use System Preferences
Open System Preferences, choose Print & Fax → Printing → Set Up Printers, and click Add when the Printer Setup Utility appears. You can share your printers with other computers by opening System Preferences and selecting Print & Fax and clicking “Share my printers with other computers.”
Whichever way you end up clicking the Add button, Printer Setup Utility automatically searches for Rendezvous-enabled printers on your network. If a Rendezvous-enabled printer is found, you can easily add this printer and you’ll be ready to use it immediately. If a Rendezvous-enabled printer is not found, you can select one of several alternatives from the pop-up menu as shown in Figure 4-1.
If you have a printer on your network that is not Rendezvous-enabled, you’ll need to have some information about it on hand:
The printer’s IP address or hostname.
The manufacturer and model of the printer.
Tip
If you don’t know the exact model of the printer, you may be able to set up the printer, albeit with reduced functionality. For example, if all you know is that you’ve got some kind of HP DeskJet, you could configure the printer as a generic DeskJet by selecting ESP → HP New DeskJet Series CUPS from the Printer Model options when you are adding the printer. However, knowing the exact model will probably let you take advantage of special printing features such as duplex printing.
To set up an IP printer, change the Rendezvous selection in Printer Setup Utility to “IP Printing” as shown in Figure 4-2.
You need to select a Printer Type from the following choices:
For example, suppose you have a Tektronix Phaser 740 on your LAN and that its IP address is 192.168.0.77. In this case, you would select LPD/LPR as the Printer Type, enter 192.168.0.77 as the Printer Address, specify a Queue Name if required (otherwise it will be called “default”), and select the Tektronix Phaser 740 under Printer Model. Click the Add button and you’ll be ready to print.
If you can’t find your printer model, you can try selecting Generic; in most instances, that should work.
Setting up an LPD/LPR printer in this manner allows you to print
documents not only by selecting Print from GUI-based applications,
but also manipulate the print queue from the Terminal using the CUPS
lp
, lpstat
, and
cancel
shell commands.
Once your printer has been added, you can change some of its settings (location, printer model, and any installable options) using the Printer Setup Utility. To do this, open the Printer Setup Utility, highlight the printer whose settings you want to change, and click the Show Info icon in the toolbar; this opens the Printer Info window, which you can use to make the changes. Click Apply Changes to make your changes take effect.
You can use the Printer Setup Utility to create desktop icons for printers. To do this, open Printer Setup Utility, highlight the printer in the list, and choose Printers → Create Desktop Printer from the menu bar. You can save the printer’s desktop icon to the desktop or to any folder in which you have write permission. You can also place the printer’s desktop icon in the left section of the dock with icons of applications or in the lower section of the Finder’s Places sidebar. In each case, you’ll be able to print a document by dragging its icon to the printer’s icon.
Printers with a network adapter are not necessarily the only printers available on your LAN. You can share a printer that’s connected to your computer with other computers. For example, you can share your USB printer with all the computers on your LAN by opening Preferences → Sharing, clicking the Services tab, and enabling Printer Sharing.
Tip
When you change a system preference you may need to click the lock in the lower left corner to authenticate yourself as an administrative user before you make any changes.
If you’ve activated the firewall, enabling Printer Sharing will open up ports 631 (Internet Printing Protocol) and 515 (lpd). Once you’ve shared your printer, other Macs on your subnet should automatically see your printer in their Print dialogs. If a user is on your local network, but not on your subnet, she can connect to your printer using the IP address or hostname of your Macintosh.
In addition to sharing your printer with Mac users, you can also share it with other Linux, Unix, and Windows users. If a Unix or Linux computer is on the same subnet as the computer sharing its printers and has CUPS installed, it will see the shared printer automatically. If not, you will need to provide the IP address of the computer sharing the printer (see Section 4.2.1, later in this chapter).
To let Windows users connect to your printer, activate both Printer Sharing and Windows Sharing in the Sharing pane of System Preferences. Windows users on your network can now add the printer.
After you’ve activated sharing of your printer with other computers on your network, you may want to add some information about the physical location of the printer. You can do this by opening Printer Setup Utility, highlighting the shared printer, clicking the Show Info icon, and entering the location in the location field.
It is easy to print to a printer that is shared by a Windows computer. If your Mac is on the same subnet as the Windows machine, you will probably see it listed with other available printers in Printer Setup Utility. In this case, just check the In Menu box to the left of the printer name. Subsequently, this printer will be available in Print dialogs. If the Windows printer does not show up in the list, you can add it by clicking the Add icon, selecting Windows Printing in the pop-up dialog, and choosing the appropriate network workgroup. Once you’ve done this, any available Windows printers will appear in the Printer Setup Utility printer list; select the one that you’d like to use. For additional information, select Help → Printer Setup Utility Help and search for SMB (Server Message Block, the Windows networking protocol).
Get Mac OS X Panther for Unix Geeks, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.