|
The last part of any CUPS filtering chain is a backend. Backends
are special programs that send the print-ready file to the final
device. There is a separate backend program for any transfer
protocol for sending print jobs over the network, and one for every local
interface. Every CUPS print queue needs to have a CUPS “device-URI”
associated with it. The device URI is the way to encode the backend
used to send the job to its destination. Network device-URIs use
two slashes in their syntax, local device URIs only one, as you can
see from the following list. Keep in mind that local interface names
may vary greatly from my examples, if your OS is not Linux:
-
usb
-
This backend sends print files to USB-connected printers. An
example for the CUPS device-URI to use is
usb:/dev/usb/lp0 .
-
serial
-
This backend sends print files to serially connected printers.
An example for the CUPS device-URI to use is
serial:/dev/ttyS0?baud=11500 .
-
parallel
-
This backend sends print files to printers connected to the
parallel port. An example for the CUPS device-URI to use is
parallel:/dev/lp0 .
-
SCSI
-
This backend sends print files to printers attached to the
SCSI interface. An example for the CUPS device-URI to use is
scsi:/dev/sr1 .
-
lpd
-
This backend sends print files to LPR/LPD-connected network
printers. An example for the CUPS device-URI to use is
lpd://remote_host_name/remote_queue_name .
-
AppSocket/HP JetDirect
-
This backend sends print files to AppSocket (a.k.a., HP
JetDirect) connected network printers. An example for the CUPS
device-URI to use is
socket://10.11.12.13:9100 .
-
ipp
-
This backend sends print files to IPP-connected network
printers (or to other CUPS servers). Examples for CUPS device-URIs
to use are
ipp:://192.193.194.195/ipp
(for many HP printers) and
ipp://remote_cups_server/printers/remote_printer_name .
-
http
-
This backend sends print files to HTTP-connected printers.
(The https:// CUPS backend is only a symlink to the ipp:// backend.)
Examples for the CUPS device-URIs to use are
https:://192.193.194.195:631/ipp
(for many HP printers) and
https://remote_cups_server:631/printers/remote_printer_name .
-
smb
-
This backend sends print files to printers shared by a Windows
host. Examples of CUPS device-URIs that may be used includes:
smb://workgroup/server/printersharename
|
smb://server/printersharename
|
smb://username:password@workgroup/server/printersharename
|
smb://username:password@server/printersharename
|
The smb:// backend is a symlink to the Samba utility
smbspool
(does not ship with CUPS). If the
symlink is not present in your CUPS backend directory, have your
root user create it:
ln -s `which smbspool'
/usr/lib/cups/backend/smb
.
It is easy to write your own backends as shell or Perl scripts if you
need any modification or extension to the CUPS print system. One
reason could be that you want to create “special” printers that send
the print jobs as email (through a “mailto:/” backend), convert them to
PDF (through a “pdfgen:/” backend) or dump them to “/dev/null”. (In
fact, I have the systemwide default printer set up to be connected to
a devnull:/ backend: there are just too many people sending jobs
without specifying a printer, and scripts and programs that do not name
a printer. The systemwide default deletes the job and sends a polite
email back to the $USER asking him or her to always specify the correct
printer name.)
Not all of the mentioned backends may be present on your system or
usable (depending on your hardware configuration). One test for all
available CUPS backends is provided by the
lpinfo
utility. Used with the -v parameter, it lists
all available backends:
$
lpinfo -v
|
|