]> git.ipfire.org Git - thirdparty/cups.git/blame - man/backend.man
Changelog.
[thirdparty/cups.git] / man / backend.man
CommitLineData
771e5703 1.\"
b2e10895 2.\" "$Id$"
771e5703 3.\"
7cfa02ab 4.\" Backend man page for CUPS.
771e5703 5.\"
dc0f86cb 6.\" Copyright 2007-2013 by Apple Inc.
766ef83d 7.\" Copyright 1997-2006 by Easy Software Products.
771e5703 8.\"
9.\" These coded instructions, statements, and computer programs are the
4e8d321f 10.\" property of Apple Inc. and are protected by Federal copyright
11.\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
12.\" which should have been included with this file. If this file is
13.\" file is missing or damaged, see the license at "http://www.cups.org/".
771e5703 14.\"
c45401bb 15.TH backend 7 "CUPS" "23 April 2012" "Apple Inc."
6248387b 16
771e5703 17.SH NAME
e6c9b8b4 18backend \- cups backend transmission interfaces
771e5703 19.SH SYNOPSIS
20.B backend
684e9864 21.br
22.B backend
e6c9b8b4 23job user title num-copies options [
24.I filename
25]
771e5703 26.SH DESCRIPTION
c45401bb 27Backends are a special type of \fIfilter(7)\fR which is used to send print data
28to and discover different devices on the system.
771e5703 29.LP
c45401bb 30Like filters, backends must be capable of reading from a filename on the
31command-line or from the standard input, copying the standard input to a
32temporary file as required by the physical interface.
771e5703 33.LP
5363607d 34The command name (argv[0]) is set to the device URI of the destination printer.
35Starting with CUPS 1.1.22, any authentication information in argv[0] is removed,
36so backend developers are urged to use the DEVICE_URI environment variable
37whenever authentication information is required. The CUPS API includes a
38\fIcupsBackendDeviceURI\fR function for retrieving the correct device URI.
684e9864 39.LP
766ef83d 40Back-channel data from the device should be relayed to the job
684e9864 41filters by writing to file descriptor 3. The CUPS API includes
766ef83d 42the \fIcupsBackChannelWrite\fR function for this purpose.
74dfc645 43.SH WARNING
44CUPS backends are not generally design to be run directly by the user. Aside
45from the device URI issue (argv[0] and DEVICE_URI environment variable contain
46the device URI), CUPS backends also expect specific environment variables and
47file descriptors, and typically run in a user session that (on OS X) has
48additional restrictions that affect how it runs. Backends can also be installed
49with restricted permissions (0500 or 0700) that tell the scheduler to run them
50as the "root" user instead of an unprivileged user (typically "lp") on the
51system.
52.LP
53Unless you are a developer and know what you are doing, please do not run
54backends directly. Instead, use the \fIlp(1)\fR or \fIlpr(1)\fR programs to send
55a print job or \fIlpinfo(8)\fR program to query for available printers using the
56backend. The one exception is the SNMP backend - see \fIsnmpbackend(8)\fR for
57more information.
684e9864 58.SH DEVICE DISCOVERY
74dfc645 59When run with no arguments, the backend should list the devices and schemes it
60supports or is advertising to stdout. The output consists of zero or more lines
61consisting of any of the following forms:
684e9864 62
63.nf
766ef83d 64 device-class scheme "Unknown" "device-info"
65 device-class device-uri "device-make-and-model" "device-info"
66 device-class device-uri "device-make-and-model" "device-info" "device-id"
2317ac1e 67 device-class device-uri "device-make-and-model" "device-info" "device-id" "device-location"
684e9864 68.fi
684e9864 69.LP
70The \fIdevice-class\fR field is one of the following values:
684e9864 71.TP 5
72direct
73.br
74dfc645 74The device-uri refers to a specific direct-access device with no options, such
75as a parallel, USB, or SCSI device.
684e9864 76.TP 5
77file
78.br
79The device-uri refers to a file on disk.
684e9864 80.TP 5
81network
82.br
74dfc645 83The device-uri refers to a networked device and conforms to the general form for
84network URIs.
684e9864 85.TP 5
86serial
87.br
74dfc645 88The device-uri refers to a serial device with configurable baud rate and other
89options. If the device-uri contains a baud value, it represents the maximum baud
90rate supported by the device.
684e9864 91.LP
74dfc645 92The \fIscheme\fR field provides the URI scheme that is supported by the backend.
93Backends should use this form only when the backend supports any URI using that
94scheme. The \fIdevice-uri\fR field specifies the full URI to use when
95communicating with the device.
684e9864 96.LP
74dfc645 97The \fIdevice-make-and-model\fR field specifies the make and model of the
98device, e.g. "Example Foojet 2000". If the make and model is not known, you must
99report "Unknown".
684e9864 100.LP
74dfc645 101The \fIdevice-info\fR field specifies additional information about the device.
102Typically this includes the make and model along with the port number or network
103address, e.g. "Example Foojet 2000 USB #1".
684e9864 104.LP
74dfc645 105The optional \fIdevice-id\fR field specifies the IEEE-1284 device ID string for
106the device, which is used to select a matching driver.
2317ac1e 107.LP
108The optional \fIdevice-location\fR field specifies the physical location of
109the device, which is often used to pre-populate the printer-location attribute
110when adding a printer.
766ef83d 111.SH PERMISSIONS
74dfc645 112Backends without world execute permissions are run as the root user. Otherwise,
113the backend is run using an unprivileged user account, typically "lp".
6248387b 114.SH EXIT CODES
74dfc645 115The following exit codes are defined for backends; C API constants defined in
116the <cups/backend.h> header file are defined in parenthesis:
6248387b 117.TP 5
1180 (CUPS_BACKEND_OK)
119.br
74dfc645 120The print file was successfully transmitted to the device or remote server.
6248387b 121.TP 5
1221 (CUPS_BACKEND_FAILED)
123.br
74dfc645 124The print file was not successfully transmitted to the device or remote server.
125The scheduler will respond to this by canceling the job, retrying the job, or
126stopping the queue depending on the state of the error-policy attribute.
6248387b 127.TP 5
59de43b4 1282 (CUPS_BACKEND_AUTH_REQUIRED)
6248387b 129.br
74dfc645 130The print file was not successfully transmitted because valid authentication
131information is required. The scheduler will respond to this by holding the job
132and adding the "cups-held-for-authentication" keyword to the "job-reasons"
133attribute.
6248387b 134.TP 5
1353 (CUPS_BACKEND_HOLD)
136.br
74dfc645 137The print file was not successfully transmitted because it cannot be printed at
138this time. The scheduler will respond to this by holding the job.
6248387b 139.TP 5
1404 (CUPS_BACKEND_STOP)
141.br
74dfc645 142The print file was not successfully transmitted because it cannot be printed at
143this time. The scheduler will respond to this by stopping the queue.
6248387b 144.TP 5
59de43b4 1455 (CUPS_BACKEND_CANCEL)
6248387b 146.br
74dfc645 147The print file was not successfully transmitted because one or more attributes
148are not supported or the job was canceled at the printer. The scheduler will
149respond to this by canceling the job.
7cfa02ab 150.TP 5
1516 (CUPS_BACKEND_RETRY)
152.br
153The print file was not successfully transmitted because of a temporary issue.
154The scheduler will retry the job at a future time - other jobs may print before
155this one.
7cfa02ab 156.TP 5
1577 (CUPS_BACKEND_RETRY_CURRENT)
158.br
159The print file was not successfully transmitted because of a temporary issue.
160The scheduler will retry the job immediately without allowing intervening jobs.
6248387b 161.PP
162All other exit code values are reserved.
771e5703 163.SH SEE ALSO
c45401bb 164\fIcups-snmp(8)\fR, \fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, \fIfilter(7)\fR,
165\fIlpinfo(8)\fR,
684e9864 166.br
6248387b 167http://localhost:631/help
771e5703 168.SH COPYRIGHT
dc0f86cb 169Copyright 2007-2013 by Apple Inc.
771e5703 170.\"
b2e10895 171.\" End of "$Id$".
771e5703 172.\"