1printers(4)                      File Formats                      printers(4)
2
3
4

NAME

6       printers - user-configurable printer alias database
7

SYNOPSIS

9       $HOME/.printers
10
11

DESCRIPTION

13       The  $HOME/.printers  file  is  a  simplified  version  of  the  system
14       /etc/printers.conf  file.  See  printers.conf(4).  Users   create   the
15       $HOME/.printers  file  in  their  home directory. This optional file is
16       customizable by the user.
17
18
19       The $HOME/.printers file performs the following functions:
20
21           1.     Sets personal aliases for all print commands.
22
23           2.     Sets the interest list for the  lpget,  lpstat,  and  cancel
24                  commands. See lpget(1M), lpstat(1) and cancel(1).
25
26           3.     Sets the default printer for the lp, lpr, lpq, and lprm com‐
27                  mands. See lp(1), lpr(1B), lpq(1B), and lprm(1B).
28
29   Entries
30       Use a line or full screen editor to create or modify the  $HOME/.print‐
31       ers file.
32
33
34       Each  entry  in  $HOME/.printers describes one destination. Entries are
35       one line consisting of two fields separated by either  BLANKs  or  TABs
36       and  terminated  by  a  NEWLINE. Format for an entry in $HOME/.printers
37       varies according to the purpose of the entry.
38
39
40       Empty lines can be included for readability. Entries can continue on to
41       multiple lines by adding a backslash (`\') as the last character in the
42       line. The $HOME/.printers file can include comments.  Comments  have  a
43       pound sign (`#') as the first character in the line, and are terminated
44       by a NEWLINE.
45
46   Setting Personal Aliases
47       Specify the alias or aliases in  the  first  field.  Separate  multiple
48       aliases  by  a  pipe  sign (`|'). Specify the destination in the second
49       field. A destination names a printer or class of  printers,  See  lpad‐
50       min(1M). Specify the destination using atomic, URI-style (scheme://end‐
51       point), or POSIX-style (server:destination) names. See printers.conf(4)
52       for information regarding the naming conventions for destination names.
53
54   Setting the Interest List for lpget, lpstat and cancel
55       Specify  _all  in the first field. Specify the list of destinations for
56       the interest list in the second field. Separate each destinations by  a
57       comma    (`,').    Specify   destinations   using   atomic,   URI-style
58       (scheme://endpoint), or  POSIX-style  (server:destination)  names.  See
59       printers.conf(4)  for  information regarding the naming conventions for
60       destination names. This list of destinations  can  refer  to  an  alias
61       defined in $HOME/.printers.
62
63   Setting the Default Destination
64       Specify _default in the first field. Specify the default destination in
65       the second field. Specify the default destination  using  atomic,  URI-
66       style  (scheme://endpoint),  or POSIX-style (server:destination) names.
67       See printers.conf(4) for information regarding the  naming  conventions
68       for  destination  names.  The default destination can refer to an alias
69       defined in $HOME/.printers.
70
71   Locating Destination Information
72       The print client commands locate destination information based  on  the
73       "printers"  database  entry  in  the  /etc/nsswitch.conf file. See nss‐
74       witch.conf(4).
75
76   Locating the Personal Default Destination
77       The default destination is located differently depending  on  the  com‐
78       mand.
79
80
81       The lp command locates the default destination in the following order:
82
83           1.     lp command's -d destination option.
84
85           2.     LPDEST environment variable.
86
87           3.     PRINTER environment variable.
88
89           4.     _default destination in $HOME/.printers.
90
91           5.     _default destination in /etc/printers.conf.
92
93
94       The  lpr,  lpq, and lprm commands locate the default destination in the
95       following order:
96
97           1.     lpr command's -P destination option.
98
99           2.     PRINTER environment variable.
100
101           3.     LPDEST environment variable.
102
103           4.     _default destination in $HOME/.printers.
104
105           5.     _default destination in /etc/printers.conf.
106
107   Locating the Interest List for lpget, lpstat, and cancel
108       The lpget, lpstat, and cancel commands locate the interest list in  the
109       following order:
110
111           1.     _all list in $HOME/.printers.
112
113           2.     _all list in /etc/printers.conf.
114

EXAMPLES

116       Example 1 Setting the Interest List
117
118
119       The  following entry sets the interest list to destinations ps, secure,
120       and dog at server west and finance_ps:
121
122
123         _all      ps,secure,west:dog,lpd://server/printers/queue
124
125
126
127       Example 2 Setting Aliases to a Printer
128
129
130       The following entry sets the aliases ps, lp, and lw to sparc_printer:
131
132
133         ps|lp|lw  sparc_printer
134
135
136
137       Example 3 Setting an Alias as a Default Destination
138
139
140       The following entry sets the alias pcl to  hplj  and  sets  it  as  the
141       default destination:
142
143
144         pcl|_default   hplj
145
146
147
148       Example 4 Setting an Alias to a Server Destination
149
150
151       The  following  entry  sets  the alias secure to destination catalpa at
152       server tabloid:
153
154
155         secure    tabloid:catalpa
156
157
158
159       Example 5 Setting an Alias to a Site Destination
160
161
162       The following entry sets the alias  insecure  to  destination  legal_ps
163       using IPP:
164
165
166         insecure  ipp://server/printers/legal_ps
167
168
169

FILES

171       /etc/printers.conf      System printer configuration database
172
173
174       $HOME/.printers         User-configurable printer database
175
176
177       ou=printers             LDAP version of /etc/printers.conf
178
179
180       printers.conf.byname    NIS version of /etc/printers.conf
181
182
183       printers.org_dir        NIS+ version of /etc/printers.conf
184
185

ATTRIBUTES

187       See attributes(5) for descriptions of the following attributes:
188
189
190
191
192       ┌─────────────────────────────┬─────────────────────────────┐
193       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
194       ├─────────────────────────────┼─────────────────────────────┤
195       │Availability                 │SUNWpcu                      │
196       ├─────────────────────────────┼─────────────────────────────┤
197       │Interface Stability          │Stable                       │
198       └─────────────────────────────┴─────────────────────────────┘
199

SEE ALSO

201       cancel(1),  lp(1),  lpq(1B), lpr(1B), lprm(1B), lpstat(1), lpadmin(1M),
202       lpget(1M),  nsswitch.conf(4),  printers.conf(4),  attributes(5),  stan‐
203       dards(5)
204
205
206       System Administration Guide: Basic Administration
207

NOTES

209       $HOME/.printers  is  referenced by the printing commands before further
210       name resolution is made in /etc/printers.conf or the name  service.  If
211       the alias references a destination defined in /etc/printers.conf, it is
212       possible that the destination is defined differently on different  sys‐
213       tems.  This  could cause output to be sent to an unintended destination
214       if the user is logged in to a different system.
215
216
217
218SunOS 5.11                        5 Jun 2006                       printers(4)
Impressum