Difference between revisions of "LPRng"

From ArchWiki
Jump to: navigation, search
Line 26: Line 26:
  
 
Two control files must be configured, ''lpd.conf'' and ''lpd.perms''.  The default configurations in ''/usr/share/doc/lprng'' are adequate for a client computer printing to a remote printer.  Copy these to ''/etc/lprng/lpd/''.  For a server receiving requests across the Internet, uncomment the last line in ''lpd.conf'' and configure permissions as documented in the comments in ''lpd.perms''.  The files ''lpd.conf.sample'' and ''lpd.perms.sample'', located in ''/usr/share/doc/lprng'', document more complex situations.
 
Two control files must be configured, ''lpd.conf'' and ''lpd.perms''.  The default configurations in ''/usr/share/doc/lprng'' are adequate for a client computer printing to a remote printer.  Copy these to ''/etc/lprng/lpd/''.  For a server receiving requests across the Internet, uncomment the last line in ''lpd.conf'' and configure permissions as documented in the comments in ''lpd.perms''.  The files ''lpd.conf.sample'' and ''lpd.perms.sample'', located in ''/usr/share/doc/lprng'', document more complex situations.
 +
 +
===Configure filters===
 +
 +
If you have a network postscript printer you are in luck.  The sample postscript filter ''/usr/share/doc/lprng/psfilter'' converts pdf and text files to postscript.  Other file types are rejected.  Copy this file to ''/usr/lib/lprng/lpd'' and rename it as desired.  Then edit it to set your paper type and your choice of simplex/duplex printing.  If you wish to have separate simplex and duplex print queues, make two copies with different names and edit appropriately.
 +
 +
Another mechanism for print filtering is via the foomatic system.  This is the modern system used by CUPS.  Install the ''foomatic-filters-lprng'' package from the AUR (the ''foomatic-rip'' program in the CUPS installation has been modified to remove LPRng support) and use ''foofilter'' as described above, editing for your desired ''.ppd file''.  Install the ''.ppd'' file in conformance with the path specified in ''foofilter''.  (''/etc/lprng/lpd'' is a good location.)
 +
 +
To use Hewlett Packard printers, install ''hplip'' from the main distribution.  This package has ''.ppd'' files for virtually all Hewlett Packard printers.
 +
 +
If you have a printer that has a Ghostscript driver, copy and edit ''gsfilter'' as above to set the appropriate driver and the paper type.  You can discover the drivers available in your version of Ghostscript by typing the command ''gs -h''.  Note that support for various printer features is typically limited and out of date with this option.

Revision as of 21:43, 2 January 2015


LPRng is an alternative print spooler to CUPS. It was designed as a drop-in replacement for the old Berkeley Unix LPR system. It is mature and robust and it handles print filtering in a transparent and flexible manner.

Complete documentation exists on the LPRng website: [1] The man pages are also a useful source of information.

Installation

  • Install the lprng package from the AUR.
  • Install optional filter packages:
    • poppler
    • enscript
    • ghostscript
    • hplip
    • foomatic-filters-lprng (AUR)

Configuration

Configuration consists of the following steps:

  • Set up control files
  • Configure filters
  • Create a printcap file and spool directories
  • Enable and start the lpd daemon using systemctl

Control files

Two control files must be configured, lpd.conf and lpd.perms. The default configurations in /usr/share/doc/lprng are adequate for a client computer printing to a remote printer. Copy these to /etc/lprng/lpd/. For a server receiving requests across the Internet, uncomment the last line in lpd.conf and configure permissions as documented in the comments in lpd.perms. The files lpd.conf.sample and lpd.perms.sample, located in /usr/share/doc/lprng, document more complex situations.

Configure filters

If you have a network postscript printer you are in luck. The sample postscript filter /usr/share/doc/lprng/psfilter converts pdf and text files to postscript. Other file types are rejected. Copy this file to /usr/lib/lprng/lpd and rename it as desired. Then edit it to set your paper type and your choice of simplex/duplex printing. If you wish to have separate simplex and duplex print queues, make two copies with different names and edit appropriately.

Another mechanism for print filtering is via the foomatic system. This is the modern system used by CUPS. Install the foomatic-filters-lprng package from the AUR (the foomatic-rip program in the CUPS installation has been modified to remove LPRng support) and use foofilter as described above, editing for your desired .ppd file. Install the .ppd file in conformance with the path specified in foofilter. (/etc/lprng/lpd is a good location.)

To use Hewlett Packard printers, install hplip from the main distribution. This package has .ppd files for virtually all Hewlett Packard printers.

If you have a printer that has a Ghostscript driver, copy and edit gsfilter as above to set the appropriate driver and the paper type. You can discover the drivers available in your version of Ghostscript by typing the command gs -h. Note that support for various printer features is typically limited and out of date with this option.