LPD on Debian/Ubuntu

draft – testing on Bionic against a Xerox Phaser 3260 printer

PRELIMINARIES

systemctl list-unit-files | grep cups

systemctl stop cups.service
systemctl stop cups-browsed.service
systemctl stop cups.path
systemctl stop cups.socket

systemctl disable cups.service
systemctl disable cups-browsed.service
systemctl disable cups.path
systemctl disable cups.socket

apt purge cups-bsd

INSTALL

apt install lpr
#apt install lprng lprng-doc

SETUP

talking RFC1179 (LPD) to remote printer xerox (fix /etc/hosts or DNS)

nmap -p 515 xerox

diff /usr/share/doc/lpr/examples/printcap /etc/printcap
cp /etc/printcap /etc/printcap.dist
vi /etc/printcap

lp|xerox remote:\
         :lp=:\
         :rm=xerox:\
         :rp=remoteprinter:\
         :sd=/var/spool/lpd/remote:\
         :mx#0:\
         :sh:

ll /var/spool/lpd/remote/
/etc/init.d/lpd stop
/etc/init.d/lpd start

or with LPRNG

#cd /usr/share/doc/lprng/examples/
#gunzip *

#.common:
#   :sd=/var/spool/lpd/%P
#   :sh:mx=0:mc=0
#
#lp:tc=.common:lp=lp@xerox

#/etc/init.d/lprng status

FIRST SHOT ACCEPTANCE

send two lines of raw text - let’s see what happens

printf test\\ntest\\n | lpr

send two lines of postscript

apt install enscript
printf test\\nwith_enscript\\n | enscript

FILTERS

now let’s try to print PDFs and shit

Apsfilter (possibly remote)

apt install a2ps psutils apsfilter
apsfilterconfig

Magicfilter (local only?)

apt install magicfilter
magicfilterconfig

Foomatic

draft

apt install foomatic-db foomatic-db-engine foomatic-filters foomatic-filters-beh
#foomatic-db-gutenprint foomatic-db-compressed-ppds
apt install libpoppler-cil ghostscript

foomatic-configure -n QUEUE-NAME

OPERATIONS

lpq
lprm ...

REFERENCES

/usr/share/doc/lpr

/usr/share/doc/lprng

PRINTCAP(5)

Line Printer Daemon protocol https://en.wikipedia.org/wiki/Line_Printer_Daemon_protocol

20.6. What is RFC 1179, the Line Printer Daemon Protocol? http://www.lprng.com/LPRng-HOWTO-Multipart/rfc1179.html

UNIX System Manager’s Manual (SMM) https://people.debian.org/~adamm/doc/#smm

how to setup a printer with lpd https://wiki.netbsd.org/tutorials/how_to_setup_a_printer_with_lpd/

LPRNG

LPRng https://wiki.archlinux.org/index.php/LPRng

3.2. Linux http://www.lprng.com/LPRng-HOWTO-Multipart/linux.html

LPRng Reference Manual http://www.lprng.com/LPRng-HOWTO-Multipart/index.html


Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml