$Id: macos_printing.txt,v 1.1 2004/01/22 19:27:41 jmates Exp $ This document covers papd setup using netatalk-1.4b2+asun2.1.3. To properly setup printing for Mac OS through Netatalk to backend unix queues, one must do the following: 1) Install netatalk on the machine to act as the server. Netatalk is available from: http://netatalk.sourceforge.net/ And can be found in the ports tree or package format for various BSD and Linux-based systems. It usually also requires support from the kernel to run properly; check your kernel documentation and/or support files for details on enabling AppleTalk support. 2) If installing from RPM, edit /etc/atalk/config and make sure papd is set to run: PAPD_RUN=yes 3) Copy all the printer description files (PPD) from a Mac OS client to the server, and place them in some simple location, like /usr/share/ppd. PPD files can be gained from the "Printer Descriptions" folder in the "Extensions" folder in the "System Folder" on the Mac OS side of things, and are generally installed by various graphics programs or vendor printer installers. It is important that the Mac OS clients and the netatalk server share the exact same PPD files for the printers in question. Old Adobe PPD files (from 1998) can be obtained from: ftp://ftp.adobe.com/pub/adobe/printerdrivers/mac/all/ppdfiles Make sure that the PPD files have unix line endings (\n) instead of Mac OS (\r) endings, and also fix up the file names after uploading the PPD files. Otherwise, things may fail randomly: # cd /usr/share/ppd # perl -i -pe 's/\r/\n/g' * # rename.pl 's/[^A-Za-z0-9+.-]/_/g' * # rename.pl 's/$/.ppd/' * rename.pl is a spiffy perl-based batch file renamer, which can be found at: http://sial.org/code/perl/scripts/rename.pl 4) Edit the papd.conf file (in the netatalk etc directory) to contain lp-style entires for each spool you want the Mac OS clients to see. The following is an example for a HP LaserJet 5si/mx: duplex:\ :pr=|/usr/bin/lpr -Pduplex@printhost:\ :op=nobody:\ :pd=/usr/share/ppd/HP_LaserJet_5Si_Mopier.ppd: The above example assumes you have LPRng installed on the netatalk host, and are spooling to another machine (printhost) that is acting as the print server for the unix side of things. Since papd has trouble parsing the easier file format LPRng uses, one generally must use the lpr -P pipe for the pr statement. If, however, one is using a regular LPD, or has made the LPRng printcap syntax compatible with the older LPD style (:'s and \'s everywhere), then a direct queue name can be entered: duplex:\ :pr=duplex:\ :op=nobody:\ :pd=/usr/share/ppd/HP_LaserJet_5Si_Mopier.ppd: Which will require a local /etc/printcap entry for the 'duplex' queue. The "op" tag is the user the job is submitted to the unix spooler as, which you may want to set to point to a troubleshooting account that might catch any failures mailed back by the lp system, should you be running your lpd in mail spam mode. :) The "pd" option specifies a fully qualified path to the appropriate ppd file for this printer; it should be the same file as used on the Mac OS side. If a pd option is not specified, then the user will have to manually choose a PPD file-- something most users will balk at, and/or get wrong, and/or bug you about. Note that papd.conf is very picky about the exact configuration of entries in a file; even something so slight as a misplaced : will cuase a printer not to appear, or other oddities. My best advice is to leave no blank lines in the file, specify explicit ppd's for each queue, and place a commented line at the end of the file. If you need to advertise a printer in a specific AppleTalk zone other than the default, add the @zone notation to the print queue name: duplex@Admin:\ :pr=... 5) Once done editing the papd.conf file, fire up papd, and test your setup from a Mac OS client. Note that papd is quite ignorant of config file changes; adding a new queue will require a kill and a restart on the papd process. Do not send papd the HUP signal, this (on my machine, at least) causes it to exit without unregistering any printers. A regular kill will cause it to unregister queues, thankfully. To see what AppleTalk stuff is on your network, use the nbplkup tool: $ nbplkup Which will produce all sorts of strange output. To unregister something that was registered by your atalkd, try something like: $ nbpunrgstr duplex:LaserWriter If you are in a zoned enviroment, you may need to append a @zonename to the above name:type tage. For more details on unix printing, check out: http://www.oreilly.com/catalog/netprint/