setting up the line printer daemon (lpd)

testing against a Xerox Phaser 3260 printer

draft – testing on bionic

warning // lessons learned

doesn’t compile on slackware64 – the package was available for slackware 13.37 in pasture/ (32-bit only) – there’s a package for ubuntu however

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 otherwise your DNS records)

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

additional notes

#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


https://wiki.archlinux.org/title/LPRng

https://openprinting.org/driver/gutenprint/

https://mirror.tspu.ru/slackware/slackware-13.37/pasture/


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun