Author: | Francesco Poli |
---|---|
Contact: | invernomuto@paranoici.org |
Version: | 0.6 |
Copyright: | Expat license |
Notice: | Copyright (c) 2012-2021 Francesco Poli Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
About this document | |
---|---|
Web form | HyperText Markup Language |
Source form | reStructuredText |
Web stylesheet | Cascading StyleSheets |
Build directives | Makefile |
In another document (HTML, reST) you saw how to configure basic network services on our example Debian testing gateway machine. Now another useful service may be enabled on the system: printing.
First of all, install the printing system:
# aptitude install cups cups-bsd cups-client foomatic-db \ avahi-daemon_ colord_ hplip_ printer-driver-postscript-hp_ \ libnss-mdns_ cups-browsed_
and stop the service:
# service cups stop
so that you may unhurriedly modify its configuration. Set A4 as the default paper size:
# cat /etc/papersize a4
Then, edit the main configuration file so that:
# grep Browsing /etc/cups/cupsd.conf Browsing Off # grep WebInterface /etc/cups/cupsd.conf WebInterface No
and add the following two lines (after the Listen directives):
# grep 'IdleExitTimeout\|PreserveJobHistory' /etc/cups/cupsd.conf IdleExitTimeout 60 PreserveJobHistory No
Then enable the socket:
# mkdir /etc/systemd/system/cups.socket.d/ # cp -ai /usr/share/doc/cups-daemon/examples/cups-socket.localhost.conf /etc/systemd/system/cups.socket.d/ # systemctl daemon-reload # systemctl restart cups.socket
Install a text to PostScript converter:
# aptitude install enscript
edit its configuration file so that:
# grep DefaultMedia /etc/enscript.cfg DefaultMedia: A4
Configure an HP LaserJet 1320 printer connected via USB cable. Search for the printer:
# lpinfo -v | grep usb direct usb://HP/LaserJet%201320%20series?serial=00CNFW522KS9
and then for the PPD driver:
# lpinfo -m | grep 1320
Among the possible PPD drivers, choose:
# lpadmin -p lj -E \ -v 'usb://HP/LaserJet%201320%20series?serial=00CNFW522KS9' \ -m foomatic:HP-LaserJet_1320-pxlmono.ppd \ -o pdftops-renderer-default=pdftops \ -L local -D "HP LaserJet 1320" # lpoptions -p lj -o media=A4 -o sides=two-sided-long-edge # lpadmin -d lj