Imported Upstream version 1.15.1
[deb_xorg-server.git] / hw / xnest / man / Xnest.man
CommitLineData
a09e091a
JB
1.\" $Xorg: Xnest.man,v 1.3 2000/08/17 19:53:28 cpqbld Exp $
2.\" Copyright (c) 1993, 1994 X Consortium
3.\"
4.\" Permission is hereby granted, free of charge, to any person obtaining
5.\" a copy of this software and associated documentation files (the
6.\" "Software"), to deal in the Software without restriction, including
7.\" without limitation the rights to use, copy, modify, merge, publish,
8.\" distribute, sublicense, and/or sell copies of the Software, and to
9.\" permit persons to whom the Software is furnished to do so, subject to
10.\" the following conditions:
11.\"
12.\" The above copyright notice and this permission notice shall be included
13.\" in all copies or substantial portions of the Software.
14.\"
15.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
19.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21.\" OTHER DEALINGS IN THE SOFTWARE.
22.\"
23.\" Except as contained in this notice, the name of the X Consortium shall
24.\" not be used in advertising or otherwise to promote the sale, use or
25.\" other dealings in this Software without prior written authorization
26.\" from the X Consortium.
27.\"
28.\" $XFree86: xc/programs/Xserver/hw/xnest/Xnest.man,v 1.6 2001/01/27 18:21:00 dawes Exp $
29.\"
30.TH Xnest __appmansuffix__ __xorgversion__
31.SH NAME
32Xnest \- a nested X server
33.SH SYNOPSIS
34.B Xnest
35[
36.I options
37]
38.SH DESCRIPTION
39.B Xnest
40is both an X client and an X server.
41.B Xnest
42is a client of the real server which manages windows and graphics requests on
43its behalf.
44.B Xnest
45is a server to its own clients.
46.B Xnest
47manages windows and graphics requests on their behalf.
48To these clients,
49.B Xnest
50appears to be a conventional server.
51.SH OPTIONS
52.B Xnest
53supports all standard options of the sample server implementation.
54For more details, please see
55.BR Xserver (__appmansuffix__).
56The following additional arguments are supported as well.
57.TP
58.BI "\-display " string
59This option specifies the display name of the real server that
60.B Xnest
61should try to connect to.
62If it is not provided on the command line,
63.B Xnest
64will read the
65.I DISPLAY
66environment variable in order to find out this information.
67.TP
68.B \-sync
69This option tells
70.B Xnest
71to synchronize its window and graphics operations with the real server.
72This is a useful option for debugging, but it will slow down
73.BR Xnest 's
74performance considerably.
75It should not be used unless absolutely necessary.
76.TP
77.B \-full
78This option tells
79.B Xnest
80to utilize full regeneration of real server objects and reopen a new connection
81to the real server each time the nested server regenerates.
82The sample server implementation regenerates all objects in the server when the
83last client of this server terminates.
84When this happens,
85.B Xnest
86by default maintains the same top-level window and the same real server
87connection in each new generation.
88If the user selects full regeneration, even the top-level window and the
89connection to the real server will be regenerated for each server generation.
90.TP
91.BI "\-class " string
92This option specifies the default visual class of the nested server.
93It is similar to the
94.B \-cc
95option from the set of standard options except that it will accept a string
96rather than a number for the visual class specification.
97The
98.I string
99must be one of the following six values:
100.BR StaticGray ,
101.BR GrayScale ,
102.BR StaticColor ,
103.BR PseudoColor ,
104.BR TrueColor ,
105or
106.BR DirectColor .
107If both the
108.B \-class
109and
110.B \-cc
111options are specified, the last instance of either option takes precedence.
112The class of the default visual of the nested server need not be the same as the
113class of the default visual of the real server, but it must be supported by the
114real server.
115Use
116.BR xdpyinfo (__appmansuffix__)
117to obtain a list of supported visual classes on the real server before starting
118.BR Xnest .
119If the user chooses a static class, all the colors in the default color map will
120be preallocated.
121If the user chooses a dynamic class, colors in the default color map will be
122available to individual clients for allocation.
123.TP
124.BI "\-depth " int
125This option specifies the default visual depth of the nested server.
126The depth of the default visual of the nested server need not be the same as the
127depth of the default visual of the real server, but it must be supported by the
128real server.
129Use
130.BR xdpyinfo (__appmansuffix__)
131to obtain a list of supported visual depths on the real server before starting
132.BR Xnest .
133.TP
134.B \-sss
135This option tells
136.B Xnest
137to use the software screen saver.
138By default,
139.B Xnest
140will use the screen saver that corresponds to the hardware screen saver in the
141real server.
142Of course, even this screen saver is software-generated since
143.B Xnest
144does not control any actual hardware.
145However, it is treated as a hardware screen saver within the sample server code.
146.TP
147.B \-geometry \fIW\fBx\fIH\fB+\fIX\fB+\fIY\fP
148This option specifies the geometry parameters for the top-level
149.B Xnest
150window.
151See \(lqGEOMETRY SPECIFICATIONS\(rq in
152.BR X (__miscmansuffix__)
153for a discusson of this option's syntax.
154This window corresponds to the root window of the nested server.
155The width
156.I W
157and height
158.I H
159specified with this option will be the maximum width and height of each
160top-level
161.B Xnest
162window.
163.B Xnest
164will allow the user to make any top-level window smaller, but it will not
165actually change the size of the nested server root window.
166.B Xnest
167does not yet support the RANDR extension for resizing, rotation, and reflection
168of the root window.
169If this option is not specified,
170.B Xnest
171will choose
172.I W
173and
174.I H
175to be 3/4ths the dimensions of the root window of the real server.
176.TP
177.BI "\-bw " int
178This option specifies the border width of the top-level
179.B Xnest
180window.
181The integer parameter
182.I int
183must be positive.
184The default border width is 1.
185.TP
186.BI "\-name " string
187This option specifies the name of the top-level
188.B Xnest
189window as
190.IR string .
191The default value is the program name.
192.TP
193.BI "\-scrns " int
194This option specifies the number of screens to create in the nested server.
195For each screen,
196.B Xnest
197will create a separate top-level window.
198Each screen is referenced by the number after the dot in the client display name
199specification.
200For example,
201.B xterm \-display :1.1
202will open an
203.BR xterm (__appmansuffix__)
204client in the nested server with the display number
205.B :1
206on the second screen.
207The number of screens is limited by the hard-coded constant in the server sample
208code, which is usually 3.
209.TP
210.B \-install
211This option tells
212.B Xnest
213to do its own color map installation by bypassing the real window manager.
214For it to work properly, the user will probably have to temporarily quit the
215real window manager.
216By default,
217.B Xnest
218will keep the nested client window whose color map should be installed in the
219real server in the
220.I WM_COLORMAP_WINDOWS
221property of the top-level
222.B Xnest
223window.
224If this color map is of the same visual type as the root window of the nested
225server,
226.B Xnest
227will associate this color map with the top-level
228.B Xnest
229window as well.
230Since this does not have to be the case, window managers should look primarily
231at the
232.I WM_COLORMAP_WINDOWS
233property rather than the color map associated with the top-level
234.B Xnest
235window.
236.\" Is the following still true? This sentence is several years old.
237Unfortunately, window managers are not very good at doing that yet so this
238option might come in handy.
239.TP
240.BI "\-parent " window_id
241This option tells
242.B Xnest
243to use
244.I window_id
245as the root window instead of creating a window.
246.\" XRX is dead, dead, dead.
247.\" This option is used by the xrx xnestplugin.
248.SH "EXTENDED DESCRIPTION"
249Starting up
250.B Xnest
251is just as simple as starting up
252.BR xclock (__appmansuffix__)
253from a terminal emulator.
254If a user wishes to run
255.B Xnest
256on the same
257workstation as the real server, it is important that the nested server is given
258its own listening socket address.
259Therefore, if there is a server already running on the user's workstation,
260.B Xnest
261will have to be started up with a new display number.
262Since there is usually no more than one server running on a workstation,
263specifying
264.RB \(oq "Xnest :1" \(cq
265on the command line will be sufficient for most users.
266For each server running on the workstation, the display number needs to be
267incremented by one.
268Thus, if you wish to start another
269.BR Xnest ,
270you will need to type
271.RB \(oq "Xnest :2" \(cq
272on the command line.
273.PP
274To run clients in the nested server, each client needs to be given the same
275display number as the nested server.
276For example,
277.RB \(oq "xterm \-display :1" \(cq
278will start up an
279.B xterm
280process in the first nested server
281and
282.RB \(oq "xterm \-display :2" \(cq
283will start an
284.B xterm
285in the second nested server from the example above.
286Additional clients can be started from these
287.BR xterm s
288in each nested server.
289.SS "Xnest as a client"
290.B Xnest
291behaves and looks to the real server and other real clients as another real
292client.
293It is a rather demanding client, however, since almost any window or graphics
294request from a nested client will result in a window or graphics request from
295.B Xnest
296to the real server.
297Therefore, it is desirable that
298.B Xnest
299and the real server are on a local network, or even better, on the same machine.
300.B Xnest
301assumes that the real server supports the SHAPE extension.
302There is no way to turn off this assumption dynamically.
303.B Xnest
304can be compiled without the SHAPE extension built in, in which case the real
305server need not support it.
306Dynamic SHAPE extension selection support may be considered in further
307development of
308.BR Xnest .
309.PP
310Since
311.B Xnest
312need not use the same default visual as the the real server, the top-level
313window of the
314.B Xnest
315client always has its own color map.
316This implies that other windows' colors will not be displayed properly while the
317keyboard or pointer focus is in the
318.B Xnest
319window, unless the real server has support for more than one installed color map
320at any time.
321The color map associated with the top window of the
322.B Xnest
323client need not be the appropriate color map that the nested server wants
324installed in the real server.
325In the case that a nested client attempts to install a color map of a different
326visual from the default visual of the nested server,
327.B Xnest
328will put the top window of this nested client and all other top windows of the
329nested clients that use the same color map into the
330.I WM_COLORMAP_WINDOWS
331property of the top-level
332.B Xnest
333window on the real server.
334Thus, it is important that the real window manager that manages the
335.B Xnest
336top-level window looks at the
337.I WM_COLORMAP_WINDOWS
338property rather than the color map associated with the top-level
339.B Xnest
340window.
341Since most window managers don't yet appear to implement this convention
342properly,
343.B Xnest
344can optionally do direct installation of color maps into the real server
345bypassing the real window manager.
346If the user chooses this option, it is usually necessary to temporarily disable
347the real window manager since it will interfere with the
348.B Xnest
349scheme of color map installation.
350.PP
351Keyboard and pointer control procedures of the nested server change the keyboard
352and pointer control parameters of the real server.
353Therefore, after
354.B Xnest
355is started up, it will change the keyboard and pointer controls of the real
356server to its own internal defaults.
357.SS "Xnest as a server"
358.B Xnest
359as a server looks exactly like a real server to its own clients.
360For the clients, there is no way of telling if they are running on a real or a
361nested server.
362.PP
363As already mentioned,
364.B Xnest
365is a very user-friendly server when it comes to customization.
366.B Xnest
367will pick up a number of command-line arguments that can configure its default
368visual class and depth, number of screens, etc.
369.PP
370The only apparent intricacy from the users' perspective about using
371.B Xnest
372as a server is the selection of fonts.
373.B Xnest
374manages fonts by loading them locally and then passing the font name to the real
375server and asking it to load that font remotely.
376This approach avoids the overload of sending the glyph bits across the network
377for every text operation, although it is really a bug.
378The consequence of this approach is that the user will have to worry about two
379different font paths \(em a local one for the nested server and a remote one for
380the real server \(em since
381.B Xnest
382does not propagate its font path to the real server.
383The reason for this is because real and nested servers need not run on the same
384file system which makes the two font paths mutually incompatible.
385Thus, if there is a font in the local font path of the nested server, there is
386no guarantee that this font exists in the remote font path of the real server.
387The
388.BR xlsfonts (__appmansuffix__)
389client, if run on the nested server, will list fonts in the local font path and,
390if run on the real server, will list fonts in the remote font path.
391Before a font can be successfully opened by the nested server, it has to exist
392in local and remote font paths.
393It is the users' responsibility to make sure that this is the case.
394.SH "FUTURE DIRECTIONS"
395Make dynamic the requirement for the SHAPE extension in the real server, rather
396than having to recompile
397.B Xnest
398to turn this requirement on and off.
399.PP
400Perhaps there should be a command-line option to tell
401.B Xnest
402to inherit the keyboard and pointer control parameters from the real server
403rather than imposing its own.
404.PP
405.B Xnest
406should read a customization input file to provide even greater freedom and
407simplicity in selecting the desired layout.
408.PP
409There is no support for backing store and save unders, but this should also be
410considered.
411.PP
412.\" Is the following still true now that client-side font rendering is
413.\" considered the way to go?
414The proper implementation of fonts should be moved into the
415.I os
416layer.
417.SH BUGS
418Doesn't run well on servers supporting different visual depths.
419.PP
420Still crashes randomly.
421.PP
422Probably has some memory leaks.
423.SH AUTHOR
424Davor Matic, MIT X Consortium
425.SH "SEE ALSO"
426.BR Xserver (__appmansuffix__),
427.BR xdpyinfo (__appmansuffix__),
428.BR X (__miscmansuffix__)