~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to XpConfig/README

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
ImportĀ upstreamĀ versionĀ 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
                     --------------------------------------
 
3
                        The X Print Service - The Basics
 
4
                     --------------------------------------
 
5
 
 
6
Index
 
7
   - 1.0 X Print Service Overview
 
8
 
 
9
   - 2.0 How the X Print Service Works
 
10
 
 
11
   - 3.0 Using the X Print Service
 
12
        - 3.1 X Print Server Configuration
 
13
        - 3.2 Starting the X Print Service
 
14
        - 3.3 Configuring the environment
 
15
        - 3.4 General End-User Sequence
 
16
 
 
17
 
 
18
1.0  X Print Service Overview
 
19
=============================
 
20
 
 
21
The "X Print Service" technology allows X rendering to devices such as
 
22
printers and fax.  Most of the service is available in the X11
 
23
technology stack as Xp, with the remainder in the CDE technology stack
 
24
as DtPrint.  Modifications have also been made to the Motif technology
 
25
stack to support Xp and DtPrint.
 
26
 
 
27
The Xp portion consists of:
 
28
   * Xp Extension for the X-Server (included in the X-Server Xprt)
 
29
   * Xp Extension API for the client side (libXp)
 
30
   * PCL ddx driver that converts core X to native PCL
 
31
   * Postscript ddx driver that converts core X to native Postscript
 
32
   * Raster ddx driver that generates xwd rasters which can be
 
33
     converted to PCL or Postscript rasters
 
34
 
 
35
The DtPrint portion consists of:
 
36
   * A collection of print GUIs (libDtPrint)
 
37
   * A Print Dialog Manager that can assist a client in
 
38
     setting printing options (dtpdm, dtpdmd)
 
39
 
 
40
From an X clients perspective, it can attach to one of two nearly
 
41
identical X-Servers, a "Video" X-Server, and a "Print" X-Server
 
42
which has the additional Xp capability but otherwise looks and
 
43
behaves the same.
 
44
 
 
45
 
 
46
 
 
47
2.0  How the X Print Service Works
 
48
==================================
 
49
 
 
50
The X Print Service expands on the traditional X-Server and Xlib world
 
51
in four ways.
 
52
 
 
53
1. Most obvious is the use of "print ddx drivers" instead of
 
54
   "video ddx drivers".  While a video ddx driver modifies pixels
 
55
   in a video frame buffer, a print ddx driver generates "page
 
56
   description language (PDL)" output such as PCL or Postscript.
 
57
 
 
58
   Once a print ddx driver generates PDL output, it can be sent to
 
59
   a spooler such as lp(1) or retrieved by the client.
 
60
 
 
61
   Though not currently done, a single X-Server can support both
 
62
   print and video ddx drivers.
 
63
 
 
64
2. Since printers support "paged" output, unlike video, a portion
 
65
   of the Xp Extension supports APIs to delineate printed output.
 
66
   For example, XpStartPage and XpEndPage tell the X-Server where
 
67
   a physical page starts and ends in an otherwise continuous
 
68
   stream of X rendering primitives.  Likewise, XpStartJob and
 
69
   XpEndJob determine when a collection of pages starts and ends.
 
70
   XpEndJob typically causes the generated PDL to be submitted to
 
71
   a spooler, such as lp(1).
 
72
 
 
73
3. Since printers have extensive capabilities, another portion of
 
74
   the Xp Extension supports APIs to manipulate "print contexts".
 
75
 
 
76
   Once a printer is selected using the Xp Extension API, a print
 
77
   context to represent it can be created.  A print context
 
78
   embodies the printer selected - it contains the printer's
 
79
   default capabilities, selectable range of capabilities,
 
80
   printer state, and generated output.  Some "attributes" within
 
81
   the print context can be modified by the user, and the
 
82
   X-Server and print ddx driver will react accordingly.  For
 
83
   example, the attribute "content-orientation" can be set to
 
84
   "landscape" or "portrait".
 
85
 
 
86
4. Since printers can have "built in" fonts, the Xp Extension in
 
87
   the X-Server works with the print ddx drivers to make
 
88
   available (for printing only) additional fonts on a per print
 
89
   context basis.
 
90
 
 
91
   When a print context is created and set for a given printer,
 
92
   the X font calls may be able to access additional printer
 
93
   fonts.  To do this (typically), the X-Server must have access
 
94
   to "printer metric files" (.pmf) that describe at minimum the
 
95
   metrics of the built in fonts.
 
96
 
 
97
 
 
98
 
 
99
3.0  Using the X Print Service
 
100
==============================
 
101
 
 
102
There are three tasks to start the X Print Service:  1) configuring the
 
103
X Print Server, 2) starting the X Print Service, 3) configuring the user
 
104
session so that clients can find the running X Print Service.
 
105
 
 
106
The tasks are described in detail below.
 
107
 
 
108
 
 
109
3.1  X Print Server Configuration
 
110
---------------------------------
 
111
 
 
112
The X Print Server (Xprt) can read a number of configuration files which
 
113
control its behavior and support for printers.  Each vendor platform has
 
114
a default location for this information.  Xprt can also read the
 
115
environment variable XPCONFIGDIR to locate alternate configuration
 
116
directories.  Common settings include:
 
117
 
 
118
   * export XPCONFIGDIR=/X11/lib/X11/XpConfig/
 
119
 
 
120
   * export XPCONFIGDIR=/proj/x11/xc/programs/Xserver/XpConfig/
 
121
 
 
122
Xprt has many built-in defaults, and lacking any configuration files,
 
123
will immediately try to support all printers visible via lpstat(1).
 
124
 
 
125
In order of importance for configuration by a system administrator, the
 
126
configuration files for a "C" locale are as follows.
 
127
 
 
128
   ${XPCONFIGDIR}/C/print/Xprinters
 
129
 
 
130
        `Xprinters' is the top most configuration file.  It tells
 
131
        Xprt which specific printer names (e.g.  mylaser) should
 
132
        be supported, and whether lpstat(1) or other commands
 
133
        should be used to automatically supplement the list of
 
134
        printers.
 
135
 
 
136
   ${XPCONFIGDIR}/C/print/attributes/printer
 
137
 
 
138
        The `printer' file maps printer names to model
 
139
        configurations (see `model-config' below).  For example,
 
140
        "mylaser" could be mapped to a "HPDJ1600C", and all other
 
141
        arbitrary printers could be mapped to a default, such as
 
142
        "HPLJ4SI".  When depending on lpstat(1) in the Xprinters
 
143
        file, setting up defaults in `printer' becomes all the
 
144
        more important.
 
145
 
 
146
   ${XPCONFIGDIR}/C/print/attributes/document
 
147
 
 
148
        The `document' file specifies the initial document values
 
149
        for any print jobs.  For example, which paper tray to
 
150
        use, what default resolution, etc.
 
151
 
 
152
   ${XPCONFIGDIR}/C/print/attributes/job
 
153
 
 
154
        The `job' file specifies the initial job values for any
 
155
        print jobs.  For example, "notification-profile" can be
 
156
        set so that when a print job is successfully sent to a
 
157
        printer, e-mail is sent to the user.
 
158
 
 
159
   ${XPCONFIGDIR}/C/print/models/HPDJ1600C/model-config
 
160
   ${XPCONFIGDIR}/C/print/models/HPDJ1600C/fonts/fonts.dir
 
161
   ${XPCONFIGDIR}/C/print/models/HPDJ1600C/fonts/9nb00051.pmf
 
162
   ${XPCONFIGDIR}/C/print/models/HPDJ1600C/fonts/9nb00093.pmf
 
163
 
 
164
        The `model-config' file has attributes that describe the
 
165
        printer model's capabilities and default settings.
 
166
        Printer model fonts may also be present.  The model-config
 
167
        file also identifies the print ddx driver to be used.
 
168
 
 
169
        For each printer model supported, a complete hierarchy of
 
170
        files should exist.  In most cases, these files do not
 
171
        need to be modified.
 
172
 
 
173
   ${XPCONFIGDIR}/C/print/ddx-config/raster/pcl
 
174
   ${XPCONFIGDIR}/C/print/ddx-config/raster/postscript
 
175
 
 
176
        The print ddx drivers can have highly specific
 
177
        configuration files to control their behavior.  In most
 
178
        cases, these files do not need to be modified.
 
179
 
 
180
 
 
181
3.2  Starting the X Print Service
 
182
---------------------------------
 
183
 
 
184
The summary checklist for starting the X Print Service is as follows:
 
185
 
 
186
1. Choose an execution model for the X Print Service.  The X
 
187
   Print Service can be run on a per-user session basis, per
 
188
   machine basis, or can be run on a few machines globally
 
189
   available to a number of users.
 
190
 
 
191
2. If print jobs are to be submitted to a spooler (almost always
 
192
   the case), make sure all needed printers are available to the
 
193
   spooler subsystem (most often lp(1)) on the same machine
 
194
   running the X Print Service.
 
195
 
 
196
3. Configure the X Print Server.  See ``X Print Server
 
197
   Configuration''.
 
198
 
 
199
4. Depending on #1, start the X Print Server process "Xprt", and
 
200
   then the Print Dialog Manager Daemon process "dtpdmd" at the
 
201
   appropriate times.
 
202
 
 
203
The details are described below.
 
204
 
 
205
Because the X Print Service is based on X, it can be easily distributed.
 
206
The most significant factors in which execution model to choose will be
 
207
driven by:
 
208
 
 
209
   * how many printers will be accessable through the printer
 
210
     subsystem on any given machine.  A system administrator may
 
211
     choose to cluster printers on a few given machines, or
 
212
     scatter them across an organization and possibly make
 
213
     extensive use of remote spoolers to make them globally
 
214
     available.
 
215
 
 
216
   * how many machines will need a copy of the X Print Server
 
217
     configuration files.  The files have been architected so
 
218
     that one super-set version of them can be maintained and
 
219
     distributed (e.g.  via NFS), and a per-machine or per-user
 
220
     version of the `Xprinters' is all that is needed to have the
 
221
     appropriate information in them utilized or ignored.
 
222
 
 
223
   * how many users can demand services from a given X Print
 
224
     Service.
 
225
 
 
226
With the above in mind, some obvious execution models include:
 
227
 
 
228
   * Global - in this model, the system administrator is choosing
 
229
     to run the X Print Service on a *few* select machines with
 
230
     appropriate printers configured, and allow clients access to
 
231
     the global resource.  This can centralize the administration
 
232
     of printers and configuration files, but may have to be
 
233
     monitored for performance loading.
 
234
 
 
235
     Startup would likely be done by boot-up scripts.
 
236
 
 
237
   * Per-machine - every machine with potential X Print Service
 
238
     users would run the service.  Printer and configuration file
 
239
     administration is decentralized, and usage would be limited
 
240
     to the users on the machine.
 
241
 
 
242
     Startup would likely be done by boot-up scripts.
 
243
 
 
244
   * Per-user session - every user would run an entire X Print
 
245
     Service for themselves.  In the future, the Video X Server
 
246
     normally started may contain Print X Server capability, so
 
247
     this model becomes very natural.
 
248
 
 
249
     Startup would likely be done at session login or by
 
250
     launching actions or processes manually once the user
 
251
     logs in.  Note: the dtpdmd must be started after Xprt.
 
252
 
 
253
Starting of the processes is straight forward.  In strict order:
 
254
 
 
255
   [machineA] % Xprt [-XpFile <Xprinters file>] [:dispNum] &
 
256
 
 
257
      Note that Xprt will look for configuration files in either
 
258
      a default location or where XPCONFIGDIR points.
 
259
 
 
260
      -XpFile specifies an alternate `Xprinters' file, rather
 
261
      than the default one or `${XPCONFIGDIR}/C/print/Xprinters'.
 
262
 
 
263
   [machineA] % dtpdmd -d machineA[:dispNum] [-l /tmp/dtpdmd.log] &
 
264
 
 
265
      The dtpdmd will maintain an X-Selection on the X-Server,
 
266
      and will start dtpdm's as required to service requests.
 
267
 
 
268
In all but the per-user session model, the machine running the dtpdmd
 
269
(thus dtpdm's) will need display authorization to the users video
 
270
display.
 
271
 
 
272
 
 
273
 
 
274
3.3  Configuring the environment
 
275
--------------------------------
 
276
 
 
277
Once a X Print Server and dtpdmd have been started -- many of them
 
278
in some cases -- clients will need to find and use them.  There are
 
279
two mechanisms that allow clients to discover X Print Servers and
 
280
printers.
 
281
 
 
282
   * "X Print Specifier" - assuming usage of the DtPrint print
 
283
     dialogs, the following notation is understood:
 
284
 
 
285
          printer_name@machine[:dispNum]
 
286
 
 
287
     For example:
 
288
 
 
289
          colorlj7@printhub:2
 
290
 
 
291
     In the above example, the X Print Server running at `printhub:2'
 
292
     is assumed to support the printer named `colorlj7'.
 
293
 
 
294
   * "XPSERVERLIST" - assuming usage of the DtPrint print dialogs,
 
295
     the environment variable "XPSERVERLIST" can contain a list
 
296
     of X Print Servers.  For example:
 
297
 
 
298
          XPSERVERLIST="printhub:2 printhub:3 otherdept:0"
 
299
 
 
300
     Then in the dialogs, only a printer name needs to be entered.
 
301
     The dialog will then search the X Print Servers in XPSERVERLIST
 
302
     for a server than supports the printer, and then establish
 
303
     contact.
 
304
 
 
305
3.4  General End-User Sequence
 
306
------------------------------
 
307
 
 
308
From most CDEnext applications, printing is accomplished by bringing
 
309
down the <File> menu and selecting <Print...>.  This will result in
 
310
the DtPrintSetupBox dialog, which will request the name of a printer,
 
311
and offer limited capability to configure print options (e.g. number
 
312
of copies).  If the user wishes, they can select <Setup...>, which
 
313
will start a dtpdm capable of modifying additional print options.
 
314
Finally, the user should select <Print>.
 
315
 
 
316
 
 
317
 
 
318
$Xorg: README,v 1.3 2000/08/17 19:48:02 cpqbld Exp $