1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
'\" te
.\" Copyright (C) 2006, Sun Microsystems, Inc. All Rights Reserved
.\" 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.
.\" 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.
.\" 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]
.TH PRINTERS 4 "Feb 25, 2017"
.SH NAME
printers \- user-configurable printer alias database
.SH SYNOPSIS
.LP
.nf
$HOME/.printers
.fi
.SH DESCRIPTION
.LP
The \fB$HOME/.printers\fR file is a simplified version of the system
\fB/etc/printers.conf\fR file. See \fBprinters.conf\fR(4). Users create the
\fB$HOME/.printers\fR file in their home directory. This optional file is
customizable by the user.
.sp
.LP
The \fB$HOME/.printers\fR file performs the following functions:
.RS +4
.TP
1.
Sets personal aliases for all print commands.
.RE
.RS +4
.TP
2.
Sets the interest list for the \fBlpget\fR, \fBlpstat\fR, and \fBcancel\fR
commands. See \fBlpget\fR(1M), \fBlpstat\fR(1) and \fBcancel\fR(1).
.RE
.RS +4
.TP
3.
Sets the default printer for the \fBlp\fR, \fBlpr\fR, \fBlpq\fR, and
\fBlprm\fR commands. See \fBlp\fR(1), \fBlpr\fR(1B), \fBlpq\fR(1B), and
\fBlprm\fR(1B).
.RE
.SS "Entries"
.LP
Use a line or full screen editor to create or modify the \fB$HOME/.printers\fR
file.
.sp
.LP
Each entry in \fB$HOME/.printers\fR describes one destination. Entries are one
line consisting of two fields separated by either BLANKs or TABs and terminated
by a NEWLINE. Format for an entry in \fB$HOME/.printers\fR varies according to
the purpose of the entry.
.sp
.LP
Empty lines can be included for readability. Entries can continue on to
multiple lines by adding a backslash (`\fB\e\fR\&') as the last character in
the line. The \fB$HOME/.printers\fR file can include comments. Comments have a
pound sign (`\fB#\fR') as the first character in the line, and are terminated
by a NEWLINE.
.SS "Setting Personal Aliases"
.LP
Specify the alias or aliases in the first field. Separate multiple aliases by a
pipe sign (`\fB|\fR'). Specify the destination in the second field. A
destination names a printer or class of printers, See \fBlpadmin\fR(1M).
Specify the destination using atomic, URI-style
(\fIscheme\fR\fB://\fR\fBendpoint\fR), or POSIX-style
(\fIserver\fR\fB:\fR\fIdestination\fR) names. See \fBprinters.conf\fR(4) for
information regarding the naming conventions for destination names.
.SS "Setting the Interest List for lpget, lpstat and cancel"
.LP
Specify \fB_all\fR in the first field. Specify the list of destinations for the
interest list in the second field. Separate each destinations by a comma
(`\fB,\fR'). Specify destinations using atomic, URI-style
(\fIscheme\fR\fB://\fR\fBendpoint\fR), or POSIX-style
(\fIserver\fR\fB:\fR\fIdestination\fR) names. See \fBprinters.conf\fR(4) for
information regarding the naming conventions for destination names. This list
of destinations can refer to an alias defined in \fB$HOME/.printers\fR.
.SS "Setting the Default Destination"
.LP
Specify \fB_default\fR in the first field. Specify the default destination in
the second field. Specify the default destination using atomic, URI-style
(\fIscheme\fR\fB://\fR\fBendpoint\fR), or POSIX-style
(\fIserver\fR\fB:\fR\fIdestination\fR) names. See \fBprinters.conf\fR(4) for
information regarding the naming conventions for destination names. The default
destination can refer to an alias defined in \fB$HOME/.printers\fR.
.SS "Locating Destination Information"
.LP
The print client commands locate destination information based on the
"printers" database entry in the \fB/etc/nsswitch.conf\fR file. See
\fBnsswitch.conf\fR(4).
.SS "Locating the Personal Default Destination"
.LP
The default destination is located differently depending on the command.
.sp
.LP
The \fBlp\fR command locates the default destination in the following order:
.RS +4
.TP
1.
\fBlp\fR command's \fB-d\fR \fIdestination\fR option.
.RE
.RS +4
.TP
2.
\fBLPDEST\fR environment variable.
.RE
.RS +4
.TP
3.
\fBPRINTER\fR environment variable.
.RE
.RS +4
.TP
4.
\fB_default\fR destination in \fB$HOME/.printers\fR.
.RE
.RS +4
.TP
5.
\fB_default\fR destination in \fB/etc/printers.conf\fR.
.RE
.sp
.LP
The \fBlpr\fR, \fBlpq\fR, and \fBlprm\fR commands locate the default
destination in the following order:
.RS +4
.TP
1.
\fBlpr\fR command's \fB-P\fR \fIdestination\fR option.
.RE
.RS +4
.TP
2.
\fBPRINTER\fR environment variable.
.RE
.RS +4
.TP
3.
\fBLPDEST\fR environment variable.
.RE
.RS +4
.TP
4.
\fB_default\fR destination in \fB$HOME/.printers\fR.
.RE
.RS +4
.TP
5.
\fB_default\fR destination in \fB/etc/printers.conf\fR.
.RE
.SS "Locating the Interest List for lpget, lpstat, and cancel"
.LP
The \fBlpget\fR, \fBlpstat\fR, and \fBcancel\fR commands locate the interest
list in the following order:
.RS +4
.TP
1.
\fB_all\fR list in \fB$HOME/.printers\fR.
.RE
.RS +4
.TP
2.
\fB_all\fR list in \fB/etc/printers.conf\fR.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRSetting the Interest List
.sp
.LP
The following entry sets the interest list to destinations \fBps\fR,
\fBsecure\fR, and \fBdog\fR at server \fBwest\fR and \fBfinance_ps\fR:
.sp
.in +2
.nf
\fB_all ps,secure,west:dog,lpd://server/printers/queue\fR
.fi
.in -2
.sp
.LP
\fBExample 2 \fRSetting Aliases to a Printer
.sp
.LP
The following entry sets the aliases \fBps\fR, \fBlp\fR, and \fBlw\fR to
\fBsparc_printer\fR:
.sp
.in +2
.nf
\fBps|lp|lw sparc_printer\fR
.fi
.in -2
.sp
.LP
\fBExample 3 \fRSetting an Alias as a Default Destination
.sp
.LP
The following entry sets the alias \fBpcl\fR to \fBhplj\fR and sets it as the
default destination:
.sp
.in +2
.nf
\fBpcl|_default hplj\fR
.fi
.in -2
.sp
.LP
\fBExample 4 \fRSetting an Alias to a Server Destination
.sp
.LP
The following entry sets the alias \fBsecure\fR to destination \fBcatalpa\fR at
server \fBtabloid\fR:
.sp
.in +2
.nf
\fBsecure tabloid:catalpa\fR
.fi
.in -2
.sp
.LP
\fBExample 5 \fRSetting an Alias to a Site Destination
.sp
.LP
The following entry sets the alias \fBinsecure\fR to destination \fBlegal_ps\fR
using IPP:
.sp
.in +2
.nf
\fBinsecure ipp://server/printers/legal_ps\fR
.fi
.in -2
.sp
.SH FILES
.ne 2
.na
\fB\fB/etc/printers.conf\fR\fR
.ad
.RS 24n
System printer configuration database
.RE
.sp
.ne 2
.na
\fB\fB$HOME/.printers\fR\fR
.ad
.RS 24n
User-configurable printer database
.RE
.sp
.ne 2
.na
\fB\fBou=printers\fR\fR
.ad
.RS 24n
LDAP version of \fB/etc/printers.conf\fR
.RE
.sp
.ne 2
.na
\fB\fBprinters.conf.byname\fR\fR
.ad
.RS 24n
\fBNIS\fR version of \fB/etc/printers.conf\fR
.RE
.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Stable
.TE
.SH SEE ALSO
.LP
\fBcancel\fR(1), \fBlp\fR(1), \fBlpq\fR(1B), \fBlpr\fR(1B), \fBlprm\fR(1B),
\fBlpstat\fR(1), \fBlpadmin\fR(1M), \fBlpget\fR(1M), \fBnsswitch.conf\fR(4),
\fBprinters.conf\fR(4), \fBattributes\fR(5), \fBstandards\fR(5)
.sp
.LP
\fISystem Administration Guide: Basic Administration\fR
.SH NOTES
.LP
\fB$HOME/.printers\fR is referenced by the printing commands before further
name resolution is made in \fB/etc/printers.conf\fR or the name service. If the
alias references a destination defined in \fB/etc/printers.conf\fR, it is
possible that the destination is defined differently on different systems. This
could cause output to be sent to an unintended destination if the user is
logged in to a different system.
|