1backend(7) Apple Inc. backend(7)
2
3
4
6 backend - cups backend transmission interfaces
7
9 backend
10 backend job user title num-copies options [ filename ]
11
13 Backends are a special type of filter(7) which is used to send print
14 data to and discover different devices on the system.
15
16 Like filters, backends must be capable of reading from a filename on
17 the command-line or from the standard input, copying the standard input
18 to a temporary file as required by the physical interface.
19
20 The command name (argv[0]) is set to the device URI of the destination
21 printer. Starting with CUPS 1.1.22, any authentication information in
22 argv[0] is removed, so backend developers are urged to use the
23 DEVICE_URI environment variable whenever authentication information is
24 required. The CUPS API includes a cupsBackendDeviceURI function for
25 retrieving the correct device URI.
26
27 Back-channel data from the device should be relayed to the job filters
28 by writing to file descriptor 3. The CUPS API includes the cups‐
29 BackChannelWrite function for this purpose.
30
32 CUPS backends are not generally design to be run directly by the user.
33 Aside from the device URI issue (argv[0] and DEVICE_URI environment
34 variable contain the device URI), CUPS backends also expect specific
35 environment variables and file descriptors, and typically run in a user
36 session that (on OS X) has additional restrictions that affect how it
37 runs. Backends can also be installed with restricted permissions (0500
38 or 0700) that tell the scheduler to run them as the "root" user instead
39 of an unprivileged user (typically "lp") on the system.
40
41 Unless you are a developer and know what you are doing, please do not
42 run backends directly. Instead, use the lp(1) or lpr(1) programs to
43 send a print job or lpinfo(8) program to query for available printers
44 using the backend. The one exception is the SNMP backend - see snmp‐
45 backend(8) for more information.
46
48 When run with no arguments, the backend should list the devices and
49 schemes it supports or is advertising to stdout. The output consists of
50 zero or more lines consisting of any of the following forms:
51
52 device-class scheme "Unknown" "device-info"
53 device-class device-uri "device-make-and-model" "device-info"
54 device-class device-uri "device-make-and-model" "device-info" "device-id"
55 device-class device-uri "device-make-and-model" "device-info" "device-id" "device-location"
56
57 The device-class field is one of the following values:
58
59 direct
60 The device-uri refers to a specific direct-access device with no
61 options, such as a parallel, USB, or SCSI device.
62
63 file
64 The device-uri refers to a file on disk.
65
66 network
67 The device-uri refers to a networked device and conforms to the
68 general form for network URIs.
69
70 serial
71 The device-uri refers to a serial device with configurable baud
72 rate and other options. If the device-uri contains a baud value,
73 it represents the maximum baud rate supported by the device.
74
75 The scheme field provides the URI scheme that is supported by the back‐
76 end. Backends should use this form only when the backend supports any
77 URI using that scheme. The device-uri field specifies the full URI to
78 use when communicating with the device.
79
80 The device-make-and-model field specifies the make and model of the
81 device, e.g. "Example Foojet 2000". If the make and model is not known,
82 you must report "Unknown".
83
84 The device-info field specifies additional information about the
85 device. Typically this includes the make and model along with the port
86 number or network address, e.g. "Example Foojet 2000 USB #1".
87
88 The optional device-id field specifies the IEEE-1284 device ID string
89 for the device, which is used to select a matching driver.
90
91 The optional device-location field specifies the physical location of
92 the device, which is often used to pre-populate the printer-location
93 attribute when adding a printer.
94
96 Backends without world execute permissions are run as the root user.
97 Otherwise, the backend is run using an unprivileged user account, typi‐
98 cally "lp".
99
101 The following exit codes are defined for backends; C API constants
102 defined in the <cups/backend.h> header file are defined in parenthesis:
103
104 0 (CUPS_BACKEND_OK)
105 The print file was successfully transmitted to the device or
106 remote server.
107
108 1 (CUPS_BACKEND_FAILED)
109 The print file was not successfully transmitted to the device or
110 remote server. The scheduler will respond to this by canceling
111 the job, retrying the job, or stopping the queue depending on the
112 state of the error-policy attribute.
113
114 2 (CUPS_BACKEND_AUTH_REQUIRED)
115 The print file was not successfully transmitted because valid
116 authentication information is required. The scheduler will respond
117 to this by holding the job and adding the "cups-held-for-authenti‐
118 cation" keyword to the "job-reasons" attribute.
119
120 3 (CUPS_BACKEND_HOLD)
121 The print file was not successfully transmitted because it cannot
122 be printed at this time. The scheduler will respond to this by
123 holding the job.
124
125 4 (CUPS_BACKEND_STOP)
126 The print file was not successfully transmitted because it cannot
127 be printed at this time. The scheduler will respond to this by
128 stopping the queue.
129
130 5 (CUPS_BACKEND_CANCEL)
131 The print file was not successfully transmitted because one or
132 more attributes are not supported or the job was canceled at the
133 printer. The scheduler will respond to this by canceling the job.
134
135 6 (CUPS_BACKEND_RETRY)
136 The print file was not successfully transmitted because of a tem‐
137 porary issue. The scheduler will retry the job at a future time -
138 other jobs may print before this one.
139
140 7 (CUPS_BACKEND_RETRY_CURRENT)
141 The print file was not successfully transmitted because of a tem‐
142 porary issue. The scheduler will retry the job immediately with‐
143 out allowing intervening jobs.
144
145 All other exit code values are reserved.
146
148 cups-snmp(8), cupsd(8), cupsd.conf(5), filter(7), lpinfo(8),
149 http://localhost:631/help
150
152 Copyright 2007-2013 by Apple Inc.
153
154
155
15623 April 2012 CUPS backend(7)