Simple CUPS backend that can be used for avoiding writing boilerplate every time.
- Copy the
sample-backend
command into CUPS backend directory:
cp sample-backend /usr/lib/cups/backend/
chown root: /usr/lib/cups/backend/sample-backend
chmod 700 /usr/lib/cups/backend/sample-backend
- Copy
sample.cfg
andppd
file into CUPS configuration directory
cp sample.cfg /etc/cups/
cp sample.ppd /etc/cups/ppd/
- Restart CUPS and check backend lists:
lpinfo -v
- To install virtual printer using this backend, run something like:
# this will install a printer named "Sample",
lpadmin -p Sample \
-v sample-backend:/ \
-E \
-L "Beautiful and remarkable printer." \
-D "Best of the best!" \
-P /etc/cups/sample.ppd
Well done!