PAPD.CONF(5)

πŸŽ€ NAME πŸŽ€

okay so papd.conf β€” it's the config file that papd (the Netatalk printing daemon, from the Netatalk AFP Fileserver Manual, section 5 bestie πŸ’–) reads to figure out the configuration of printers used by the Netatalk printing daemon. That's the whole vibe.


🌸 DESCRIPTION 🌸

So like, papd.conf is the configuration file that papd uses to set up the printing services netatalk offers. On so many systems papd just rolls with the same defaults as lpd β€” no cap. One notable exception tho? Solaris. πŸ™ˆ

The format of papd.conf is derived from printcap(5) and it can hold configs for one printer or a whole squad of them. Any line that's not prefixed with # gets interpreted, periodt. And the configuration lines are composed like this:

printername:[options]

On systems running a System V printing system, the simplest case is either having no papd.conf at all, or having one with zero active lines. In that case atalkd should auto-discover the local printers on the machine, slay. ✨ And psst β€” you can split lines with a \ (backslash).

printername can be just a plain name (Printer 1), or it can be a full name in nbp_name format (Printer 1:LaserWriter@My Zone). Both iconic, honestly.

Systems running a BSD printing system should make use of a pipe to the printing command in question, inside the pr option β€” like pr=|/usr/bin/lpr. 🫢

When CUPS support is compiled in, then cupsautoadd as the first entry in papd.conf will automatically configure and make all CUPS printers available to papd (customizable β€” see below bestie πŸ‘‡). And you can overwrite that for individual printers by subsequently adding individual entries using the CUPS queue name as the pr entry. Note: CUPS support is mutually exclusive with the System V support described above. Pick a lane. πŸ’…

The possible options are colon delimited (:) and lines must be terminated with colons. The available options and flags are:

  • am=(uams list) β€” lets you specify specific UAMs for one particular printer. It only takes effect when authentication is enabled via ca or sp. Note: the possible values are uams_guest.so and uams_clrtxt.so only. The first method needs a valid username but no password. The second needs both a valid username and the correct password.
  • ca=(path) β€” enables CAP-style authenticated printing. The path names a directory where authenticated print jobs get staged. It implicitly enables authentication for that printer. πŸ‘‘
  • co=(CUPS options) β€” lets options get passed straight through to CUPS (e.g. co=β€œprotocol=TBCP” or co=β€œraw”).
  • cupsautoadd[:type][@zone] β€” if you use this as the first entry in papd.conf, it shares all CUPS printers via papd. The type/zone settings plus any other parameters you assign to this special shared printer apply to every CUPS printer. Unless the pd option is set, the CUPS PPDs get used. And to overwrite these global settings for individual printers, just add them subsequently to papd.conf and assign different settings. easy. 🌈
  • fo β€” if present, this flag enables a hack to translate line endings coming from pre-Mac OS X LaserWriter drivers, so foomatic-rip can recognize foomatic PPD options set in the printer dialog. Attention: use with caution, since this might corrupt binary print jobs! πŸ’€
  • op=(operator) β€” specifies the operator name, for lpd spooling. Default value is β€œoperator”.
  • pa=(appletalk address) β€” allows specification of AppleTalk addresses. Usually not needed, fr fr.
  • pd=(path to ppd file) β€” specifies a particular PPD (printer description file) to associate with the selected printer.
  • pr=(lpd/CUPS printer name or pipe command) β€” sets the lpd or CUPS printer that this gets spooled to. Default value is β€œlp”.
  • sp β€” if present, this flag enables PSSP authenticated printing. Implicitly enables authentication for the printer. ✨

πŸ¦‹ EXAMPLES πŸ¦‹

Unless CUPS support has been compiled in (which, btw, is the default from Netatalk 2.0 on), you simply define the lpd queue in question by setting the pr parameter to the queue name β€” in the following example that's β€œps”. And if no pr parameter is set, the default printer gets used. πŸ’–

πŸ’… Example: papd.conf System V printing system examples

The first spooler is known by the AppleTalk name Mac Printer Spooler, and it uses a PPD file located in /usr/share/lib/ppd. On top of that, the user mcs will be the owner of all jobs that get spooled. The second spooler is known as HP Printer and all its options are the default. no notes. πŸ‘‘

Mac Printer Spooler:\
   :pr=ps:\
   :pd=/usr/share/lib/ppd/HPLJ_4M.PPD:\
   :op=mcs:

HP Printer:\
   :

An alternative to the technique outlined above is to direct papd's output via a pipe into another program. Almost any printing system can be driven using this mechanism. 🫢

🌸 Example: papd.conf examples using pipes

The first spooler is known as HP 8100. It pipes the print job to /usr/bin/lpr for printing. PSSP authenticated printing is enabled, as is CAP-style authenticated printing. Both methods support guest and cleartext authentication as specified by the β€˜am’ option. The PPD used is /etc/atalk/ppds/hp8100.ppd.

HP 8100:\
   :pr=|/usr/bin/lpr -Plp:\
   :sp:\
   :ca=/tmp/print:\
   :am=uams_guest.so,uams_clrtxt.so:\
   :pd=/etc/atalk/ppds/hp8100.ppd:

Starting with Netatalk 2.0, direct CUPS integration is available. In this case, defining only a queue name as the pr parameter won't invoke the SysV lpd daemon β€” it uses CUPS instead. And unless a specific PPD has been assigned using the pd switch, the PPD configured in CUPS will be used by papd too. 😌

There exists one special share named β€œcupsautoadd”. If it's present as the first entry, then all available CUPS queues get served automatically using the parameters assigned to this global share. But subsequent printer definitions can be used to override those global settings for individual spoolers. main character energy only. ✨

πŸ‘‘ Example: papd.conf CUPS examples

The first entry sets up automatic sharing of all CUPS printers. All those shares appear in the zone β€œ1st floor” and, since no additional settings have been made, they use the CUPS printer name as NBP name and use the PPD configured in CUPS. The second entry defines different settings for one single CUPS printer. Its NBP name is differing from the printer's name, and the registration happens in another zone.

cupsautoadd@1st floor:op=root:

Boss' LaserWriter@2nd floor:\
   :pr=laserwriter-chief:

πŸ’€ CAVEATS πŸ’€

If you are using more than 15 printers in your network, you must specify AppleTalk zones for the papd printer configurations. Otherwise, only some of the printers may appear in the Chooser on Mac clients. not a drill bestie 😭


🌈 SEE ALSO 🌈

papd(8), atalkd.conf(5), lpd(8), lpoptions(8)


🫢 AUTHOR 🫢

Contributors to the Netatalk Project (https://netatalk.io/contributors)


okay that's the whole page, you ate that πŸŽ€πŸ’… and for the cute sign-off: this was brought to you by Netatalk 4.5.1, as documented in the PAPD.CONF(5) manual. go forth and print, bestie πŸ’œπŸŒΈβœ¨

πŸ“¦ where this page comes from