This is an old revision of the document!
Printer
The printer itself is a HP LaserJet 8000 in Raum #1.
It is reachable over the LAN, at drucker.realraum.at
. It works using the standard cups driver (cups version 3.16.3) hp-laserjet_8000_series-pcl3.ppd.
LPRng configuration
You can use directly LPRng to print from your computer, no CUPS needed!
The packages you will need (on Debian Stretch) are:
printer-driver-hpijs
ghostscript
foomatic-filters
andfoomatic-db
lprng
(obviously!)
Enabling the LPRng daemon
sudo checkpc -f # Fix various directory permissions sudo systemctl enable lprng sudo systemctl start lprng
Autostarting the LPRng daemon is relatively safe: by default, it only listens on a UNIX socket and drops to a non-root user.
Creating a PPD file
The printer driver needs a PPD file, that you can create out of the foomatic database as follows:
foomatic-ppdfile -p Lexmark-E120n | sudo tee /etc/lprng/Lexmark-E120n.ppd > /dev/null
Configuring LPRng
LPRng comes with an example /etc/printcap
file, that you may or may not use.
In any case, here is the configuration you actually need:
.common: :sd=/var/spool/lpd/%P :sh:mx=0:mc=0 :force_localhost realraum:tc=.common:lp=drucker.realraum.at%9100 :if=/usr/bin/foomatic-rip: :filter_options= --lprng $Z /etc/lprng/Lexmark-E120n.ppd:
Make GTK 2 applications use LPRng
Write gtk-print-backends = “file,lpr”
in ~/.gtkrc-2.0
.
Unfortunately, AFAIK GTK 3 has no support for LPR.