9330 stack overflow when creating a deeply nested dataset
[unleashed.git] / usr / src / man / man4 / printers.4
blobd790018360ce72d4d86e698c244a68a34499d19d
1 '\" te
2 .\" Copyright (C) 2006, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PRINTERS 4 "Feb 25, 2017"
7 .SH NAME
8 printers \- user-configurable printer alias database
9 .SH SYNOPSIS
10 .LP
11 .nf
12 $HOME/.printers
13 .fi
15 .SH DESCRIPTION
16 .LP
17 The \fB$HOME/.printers\fR file is a simplified version of the system
18 \fB/etc/printers.conf\fR file. See \fBprinters.conf\fR(4). Users create the
19 \fB$HOME/.printers\fR file in their home directory. This optional file is
20 customizable by the user.
21 .sp
22 .LP
23 The \fB$HOME/.printers\fR file performs the following functions:
24 .RS +4
25 .TP
27 Sets personal aliases for all print commands.
28 .RE
29 .RS +4
30 .TP
32 Sets the interest list for the \fBlpget\fR, \fBlpstat\fR, and \fBcancel\fR
33 commands. See \fBlpget\fR(1M), \fBlpstat\fR(1) and \fBcancel\fR(1).
34 .RE
35 .RS +4
36 .TP
38 Sets the default printer for the \fBlp\fR, \fBlpr\fR, \fBlpq\fR, and
39 \fBlprm\fR commands. See \fBlp\fR(1), \fBlpr\fR(1B), \fBlpq\fR(1B), and
40 \fBlprm\fR(1B).
41 .RE
42 .SS "Entries"
43 .LP
44 Use a line or full screen editor to create or modify the \fB$HOME/.printers\fR
45 file.
46 .sp
47 .LP
48 Each entry in \fB$HOME/.printers\fR describes one destination. Entries are one
49 line consisting of two fields separated by either BLANKs or TABs and terminated
50 by a NEWLINE. Format for an entry in \fB$HOME/.printers\fR varies according to
51 the purpose of the entry.
52 .sp
53 .LP
54 Empty lines can be included for readability. Entries can continue on to
55 multiple lines by adding a backslash (`\fB\e\fR\&') as the last character in
56 the line. The \fB$HOME/.printers\fR file can include comments. Comments have a
57 pound sign (`\fB#\fR') as the first character in the line, and are terminated
58 by a NEWLINE.
59 .SS "Setting Personal Aliases"
60 .LP
61 Specify the alias or aliases in the first field. Separate multiple aliases by a
62 pipe sign (`\fB|\fR'). Specify the destination in the second field. A
63 destination names a printer or class of printers, See \fBlpadmin\fR(1M).
64 Specify the destination using atomic, URI-style
65 (\fIscheme\fR\fB://\fR\fBendpoint\fR), or POSIX-style
66 (\fIserver\fR\fB:\fR\fIdestination\fR) names. See \fBprinters.conf\fR(4) for
67 information regarding the naming conventions for destination names.
68 .SS "Setting the Interest List for lpget, lpstat and cancel"
69 .LP
70 Specify \fB_all\fR in the first field. Specify the list of destinations for the
71 interest list in the second field. Separate each destinations by a comma
72 (`\fB,\fR'). Specify destinations using atomic, URI-style
73 (\fIscheme\fR\fB://\fR\fBendpoint\fR), or POSIX-style
74 (\fIserver\fR\fB:\fR\fIdestination\fR) names. See \fBprinters.conf\fR(4) for
75 information regarding the naming conventions for destination names. This list
76 of destinations can refer to an alias defined in \fB$HOME/.printers\fR.
77 .SS "Setting the Default Destination"
78 .LP
79 Specify \fB_default\fR in the first field. Specify the default destination in
80 the second field. Specify the default destination using atomic, URI-style
81 (\fIscheme\fR\fB://\fR\fBendpoint\fR), or POSIX-style
82 (\fIserver\fR\fB:\fR\fIdestination\fR) names. See \fBprinters.conf\fR(4) for
83 information regarding the naming conventions for destination names. The default
84 destination can refer to an alias defined in \fB$HOME/.printers\fR.
85 .SS "Locating Destination Information"
86 .LP
87 The print client commands locate destination information based on the
88 "printers" database entry in the \fB/etc/nsswitch.conf\fR file. See
89 \fBnsswitch.conf\fR(4).
90 .SS "Locating the Personal Default Destination"
91 .LP
92 The default destination is located differently depending on the command.
93 .sp
94 .LP
95 The \fBlp\fR command locates the default destination in the following order:
96 .RS +4
97 .TP
99 \fBlp\fR command's \fB-d\fR \fIdestination\fR option.
101 .RS +4
104 \fBLPDEST\fR environment variable.
106 .RS +4
109 \fBPRINTER\fR environment variable.
111 .RS +4
114 \fB_default\fR destination in \fB$HOME/.printers\fR.
116 .RS +4
119 \fB_default\fR destination in \fB/etc/printers.conf\fR.
123 The \fBlpr\fR, \fBlpq\fR, and \fBlprm\fR commands locate the default
124 destination in the following order:
125 .RS +4
128 \fBlpr\fR command's \fB-P\fR \fIdestination\fR option.
130 .RS +4
133 \fBPRINTER\fR environment variable.
135 .RS +4
138 \fBLPDEST\fR environment variable.
140 .RS +4
143 \fB_default\fR destination in \fB$HOME/.printers\fR.
145 .RS +4
148 \fB_default\fR destination in \fB/etc/printers.conf\fR.
150 .SS "Locating the Interest List for lpget, lpstat, and cancel"
152 The \fBlpget\fR, \fBlpstat\fR, and \fBcancel\fR commands locate the interest
153 list in the following order:
154 .RS +4
157 \fB_all\fR list in \fB$HOME/.printers\fR.
159 .RS +4
162 \fB_all\fR list in \fB/etc/printers.conf\fR.
164 .SH EXAMPLES
166 \fBExample 1 \fRSetting the Interest List
169 The following entry sets the interest list to destinations \fBps\fR,
170 \fBsecure\fR, and \fBdog\fR at server \fBwest\fR and \fBfinance_ps\fR:
173 .in +2
175 \fB_all         ps,secure,west:dog,lpd://server/printers/queue\fR
177 .in -2
181 \fBExample 2 \fRSetting Aliases to a Printer
184 The following entry sets the aliases \fBps\fR, \fBlp\fR, and \fBlw\fR to
185 \fBsparc_printer\fR:
188 .in +2
190 \fBps|lp|lw     sparc_printer\fR
192 .in -2
196 \fBExample 3 \fRSetting an Alias as a Default Destination
199 The following entry sets the alias \fBpcl\fR to \fBhplj\fR and sets it as the
200 default destination:
203 .in +2
205 \fBpcl|_default hplj\fR
207 .in -2
211 \fBExample 4 \fRSetting an Alias to a Server Destination
214 The following entry sets the alias \fBsecure\fR to destination \fBcatalpa\fR at
215 server \fBtabloid\fR:
218 .in +2
220 \fBsecure       tabloid:catalpa\fR
222 .in -2
226 \fBExample 5 \fRSetting an Alias to a Site Destination
229 The following entry sets the alias \fBinsecure\fR to destination \fBlegal_ps\fR
230 using IPP:
233 .in +2
235 \fBinsecure     ipp://server/printers/legal_ps\fR
237 .in -2
240 .SH FILES
241 .ne 2
243 \fB\fB/etc/printers.conf\fR\fR
245 .RS 24n
246 System printer configuration database
250 .ne 2
252 \fB\fB$HOME/.printers\fR\fR
254 .RS 24n
255 User-configurable printer database
259 .ne 2
261 \fB\fBou=printers\fR\fR
263 .RS 24n
264 LDAP version of \fB/etc/printers.conf\fR
268 .ne 2
270 \fB\fBprinters.conf.byname\fR\fR
272 .RS 24n
273 \fBNIS\fR version of \fB/etc/printers.conf\fR
276 .SH ATTRIBUTES
278 See \fBattributes\fR(5) for descriptions of the following attributes:
283 box;
284 c | c
285 l | l .
286 ATTRIBUTE TYPE  ATTRIBUTE VALUE
288 Interface Stability     Stable
291 .SH SEE ALSO
293 \fBcancel\fR(1), \fBlp\fR(1), \fBlpq\fR(1B), \fBlpr\fR(1B), \fBlprm\fR(1B),
294 \fBlpstat\fR(1), \fBlpadmin\fR(1M), \fBlpget\fR(1M), \fBnsswitch.conf\fR(4),
295 \fBprinters.conf\fR(4), \fBattributes\fR(5), \fBstandards\fR(5)
298 \fISystem Administration Guide: Basic Administration\fR
299 .SH NOTES
301 \fB$HOME/.printers\fR is referenced by the printing commands before further
302 name resolution is made in \fB/etc/printers.conf\fR or the name service. If the
303 alias references a destination defined in \fB/etc/printers.conf\fR, it is
304 possible that the destination is defined differently on different systems. This
305 could cause output to be sent to an unintended destination if the user is
306 logged in to a different system.