6

Background

We have a primarily Linux environment, but we have 40 Macs to support. I'm trying to integrate them into our standardized print system. We have about 50 printers shared from a CUPS server with CUPS Browsing.

Current Status

I have modified /printers/etc/cupsd.conf by removing the BrowseLocalProtocols line and adding the line BrowseProtocols CUPS. Now I can see all of our printers when I open the Print & Scan pane in System Preferences. Unfortunately, none of the printers show up in the print dialog for any applications.

I can add printers to the list by clicking the + to add a printer in Print & Scan, selecting a printer, and clicking add. I get a dialog asking if I want to continue since a printer with the same name already exists. I'm not sure how modifying the printer on the CUPS server will affect the clients.

Is there any way to just have all cups shared printers show up in the user's printer list? Is there a way to add these printers on the command line or in a login script? Should I add them all on a system running Workgroup Manager and distribute them with MCX?

Jeff Strunk
  • 2,107
  • 1
  • 24
  • 29

2 Answers2

2

Using CUPS you should be able to directly use the servers printers, you just need to tell the cups client to use a specific server instead of the local spooler. You can do that by modifying /etc/cups/client.conf and adding or modifying the line containing ServerName to

ServerName cups.example.com[:port]

You should be able to see and use all printers on the CUPS server. If you have local printers connected to some Macs, you cannot use this, but you should still be able to add printers using lpadmin in a script for each printer:

lpadmin -p printer -E -v ipp://server/printers/printer
lsmooth
  • 1,521
  • 1
  • 9
  • 17
  • Apparently, client.conf does not work in Lion. Not even the cli tools respect it. – Jeff Strunk Feb 07 '12 at 22:24
  • The lpadmin option does not pass along the options configured on the cups server. For instance, many of our printers have duplexers, but the `Two sided` option in the print dialog is greyed out. – Jeff Strunk Feb 07 '12 at 22:26
  • 1
    You probably need to find PPD-files to use with those duplex printers, then you should be able to use the Two sided option in the print dialog. – lsmooth Feb 07 '12 at 23:29
  • When I add a cups shared printer from the shared printer list, duplex automatically works. – Jeff Strunk Feb 08 '12 at 15:45
  • 1
    That is because adding a printer using the shared printer list the system automatically looks for the correct PPD-file for that printer. lpadmin does not do that. Instead, if you want to use a specific PPD-file you have to tell lpadmin using the -P switch. – lsmooth Feb 08 '12 at 16:33
  • It's a shame that this is the state of sharing printers in OS X. I'll probably award you the bounty but accept my own answer with Apple's instructions for doing this with Managed Preferences. – Jeff Strunk Feb 08 '12 at 21:30
  • A wild bit of clarification on `lpadmin`. If you don't specify a PPD, it behaves as a "remote printer" and works fine(but has no duplex option). Using the Generic Postscript PPD causes the printer to print postscript as plain text. You have to install the manufacturer's driver and select the right PPD for each printer. – Jeff Strunk Feb 13 '12 at 23:31
0

Apple's official answer using Managed Preferences is to distribute your PPD files to the clients and then specify the custom PPD for each print queue in Workgroup Manager.

http://support.apple.com/kb/HT4618?viewlocale=en_US

Further testing has shown that you must install and use the manufacturer's driver instead of the generic postscript ppd.

Since Apple's official method is tedious, I have written a script to automatically add all printers shared by a CUPS server using the best matched driver. I anticipate running it daily. It doesn't help with printers with optional duplexers, but most of our printers have a builtin duplexer.

Jeff Strunk
  • 2,107
  • 1
  • 24
  • 29