Xnest(1)

๐Ÿ’– Xnest(1) ๐Ÿ’– โ€” General Commands Manual energy

okay bestie, this is the Xnest(1) page from the General Commands Manual, and it is literally about a nested X server. no cap. let's get into it.


โœจ NAME โœจ

Xnest โ€” a nested X server. she contains multitudes. ๐Ÿ’…


โœจ SYNOPSIS โœจ

Xnest [ options ]

โœจ DESCRIPTION โœจ

okay so Xnest is both an X client and an X server. main character duality, fr fr. ๐Ÿฆ‹

Xnest is a client of the real server which manages windows and graphics requests on its behalf. and Xnest is a server to its own clients. Xnest manages windows and graphics requests on their behalf. to these clients, Xnest appears to be a conventional server. iconic behavior, no notes. โœจ


โœจ OPTIONS โœจ

Xnest supports all standard options of the sample server implementation. for more deets, please see Xserver(1). the following additional arguments are supported as well. periodt. ๐Ÿ’–

  • -display string โ€” this option specifies the display name of the real server that Xnest should try to connect to. if it is not provided on the command line, Xnest will read the DISPLAY environment variable in order to find out this information. she's resourceful like that. ๐ŸŒธ
  • -sync โ€” this option tells Xnest to synchronize its window and graphics operations with the real server. this is a useful option for debugging, but it will slow down Xnest's performance considerably. it should not be used unless absolutely necessary. lowkey a beast but at what cost. ๐Ÿ˜ญ
  • -full โ€” this option tells Xnest to utilize full regeneration of real server objects and reopen a new connection to the real server each time the nested server regenerates. the sample server implementation regenerates all objects in the server when the last client of this server terminates. when this happens, Xnest by default maintains the same top-level window and the same real server connection in each new generation. if the user selects full regeneration, even the top-level window and the connection to the real server will be regenerated for each server generation. it's giving โœจfresh startโœจ every single time.
  • -class string โ€” this option specifies the default visual class of the nested server. it is similar to the -cc option from the set of standard options except that it will accept a string rather than a number for the visual class specification. the string must be one of the following six values: StaticGray, GrayScale, StaticColor, PseudoColor, TrueColor, or DirectColor. if both the -class and -cc options are specified, the last instance of either option takes precedence. the class of the default visual of the nested server need not be the same as the class of the default visual of the real server, but it must be supported by the real server. use xdpyinfo(1) to obtain a list of supported visual classes on the real server before starting Xnest. if the user chooses a static class, all the colors in the default color map will be preallocated. if the user chooses a dynamic class, colors in the default color map will be available to individual clients for allocation. know the vibes before you commit, bestie. ๐ŸŽ€
  • -depth int โ€” this option specifies the default visual depth of the nested server. the depth of the default visual of the nested server need not be the same as the depth of the default visual of the real server, but it must be supported by the real server. use xdpyinfo(1) to obtain a list of supported visual depths on the real server before starting Xnest. check before you wreck. ๐Ÿ”ฅ
  • -sss โ€” this option tells Xnest to use the software screen saver. by default, Xnest will use the screen saver that corresponds to the hardware screen saver in the real server. of course, even this screen saver is software-generated since Xnest does not control any actual hardware. however, it is treated as a hardware screen saver within the sample server code. fake hardware, real drama. ๐Ÿ’€
  • -geometry WxH+X+Y โ€” this option specifies the geometry parameters for the top-level Xnest window. see โ€œGEOMETRY SPECIFICATIONSโ€ in X(7) for a discussion of this option's syntax. this window corresponds to the root window of the nested server. the width W and height H specified with this option will be the maximum width and height of each top-level Xnest window. Xnest will allow the user to make any top-level window smaller, but it will not actually change the size of the nested server root window. Xnest does not yet support the RANDR extension for resizing, rotation, and reflection of the root window. if this option is not specified, Xnest will choose W and H to be 3/4ths the dimensions of the root window of the real server. math but make it fashion. ๐ŸŒˆ
  • -bw int โ€” this option specifies the border width of the top-level Xnest window. the integer parameter int must be positive. the default border width is 1. simple, cute, positive vibes only. ๐Ÿซถ
  • -name string โ€” this option specifies the name of the top-level Xnest window as string. the default value is the program name. name her like she's the moment. ๐Ÿ‘‘
  • -scrns int โ€” this option specifies the number of screens to create in the nested server. for each screen, Xnest will create a separate top-level window. each screen is referenced by the number after the dot in the client display name specification. for example, xterm -display :1.1 will open an xterm(1) client in the nested server with the display number :1 on the second screen. the number of screens is limited by the hard-coded constant in the server sample code, which is usually 3. okay so screen math, but make it iconic. ๐Ÿ’…
  • -install โ€” this option tells Xnest to do its own color map installation by bypassing the real window manager. for it to work properly, the user will probably have to temporarily quit the real window manager. by default, Xnest will keep the nested client window whose color map should be installed in the real server in the WM_COLORMAP_WINDOWS property of the top-level Xnest window. if this color map is of the same visual type as the root window of the nested server, Xnest will associate this color map with the top-level Xnest window as well. since this does not have to be the case, window managers should look primarily at the WM_COLORMAP_WINDOWS property rather than the color map associated with the top-level Xnest window. unfortunately, window managers are not very good at doing that yet so this option might come in handy. the way that window managers stay not very good at itโ€ฆ tragic. ๐Ÿ™ˆ
  • -parent window_id โ€” this option tells Xnest to use window_id as the root window instead of creating a window. adoption arc, honestly. ๐Ÿงš

๐ŸŒธ EXTENDED DESCRIPTION ๐ŸŒธ

okay bestie so starting up Xnest is literally as easy as starting up xclock(1) from a terminal emulator โœจ But here's the thing โ€” if you wanna run Xnest on the same workstation as the real server, you have to give the nested server its own listening socket address ๐Ÿ’… So if there's already a server running on your machine, Xnest has to be started up with a new display number. And since there's usually no more than one server running on a workstation, just specifying Xnest :1 on the command line will be enough for most people ๐Ÿซถ And for each server running on the workstation, you bump the display number up by one. So if you wanna start another Xnest, you type Xnest :2 on the command line. periodt ๐Ÿ’–

To run clients in the nested server, each client needs to be given the same display number as the nested server ๐ŸŒˆ So like, xterm -display :1 will start up an xterm process in the first nested server, and xterm -display :2 will start an xterm in the second nested server from the example above. And then you can start even more clients from those xterms in each nested server ๐Ÿ‘‘


Xnest as a client ๐ŸŽ€

Xnest behaves and looks to the real server and to other real clients like just another real client ๐Ÿ’… It is a rather demanding client, though, because almost any window or graphics request from a nested client will result in a window or graphics request from Xnest to the real server ๐Ÿ˜ญ So yeah, it's desirable that Xnest and the real server are on a local network โ€” or even better, on the same machine.

Xnest assumes that the real server supports the SHAPE extension. There is literally no way to turn off this assumption dynamically ๐Ÿ‘€ Xnest can be compiled without the SHAPE extension built in, in which case the real server need not support it. And dynamic SHAPE extension selection support may be considered in further development of Xnest ๐Ÿ”ฎ

Since Xnest need not use the same default visual as the real server, the top-level window of the Xnest client always has its own color map. This implies that other windows' colors will not be displayed properly while the keyboard or pointer focus is in the Xnest window โ€” unless the real server has support for more than one installed color map at any time ๐Ÿ™ˆ

The color map associated with the top window of the Xnest client need not be the appropriate color map that the nested server wants installed in the real server. In the case that a nested client attempts to install a color map of a different visual from the default visual of the nested server, Xnest will put the top window of this nested client โ€” and all other top windows of the nested clients that use the same color map โ€” into the WM_COLORMAP_WINDOWS property of the top-level Xnest window on the real server ๐ŸชŸ

So it is important that the real window manager that manages the Xnest top-level window looks at the WM_COLORMAP_WINDOWS property rather than the color map associated with the top-level Xnest window ๐Ÿ‘‘

But since most window managers don't yet appear to implement this convention properly, Xnest can optionally do direct installation of color maps into the real server, bypassing the real window manager ๐Ÿ’… If the user chooses this option, it is usually necessary to temporarily disable the real window manager, since it will interfere with the Xnest scheme of color map installation ๐Ÿ˜ค

Keyboard and pointer control procedures of the nested server change the keyboard and pointer control parameters of the real server โŒจ๏ธ๐Ÿ–ฑ๏ธ Therefore, after Xnest is started up, it will change the keyboard and pointer controls of the real server to its own internal defaults. no cap.


Xnest as a server ๐Ÿ’œ

Xnest as a server looks exactly like a real server to its own clients โœจ For the clients, there is literally no way of telling if they are running on a real or a nested server. it's giving main character energy fr fr.

As already mentioned, Xnest is a very user-friendly server when it comes to customization ๐ŸŒธ Xnest will pick up a number of command-line arguments that can configure its default visual class and depth, number of screens, etc. slay.

The only apparent intricacy from the users' perspective about using Xnest as a server is the selection of fonts ๐Ÿ˜ญ Xnest manages fonts by loading them locally and then passing the font name to the real server and asking it to load that font remotely. This approach avoids the overload of sending the glyph bits across the network for every text operation โ€” although it is really a bug ๐Ÿ’€

The consequence of this approach is that the user will have to worry about two different font paths โ€” a local one for the nested server and a remote one for the real server โ€” since Xnest does not propagate its font path to the real server ๐Ÿ˜ฉ The reason for this is because real and nested servers need not run on the same file system, which makes the two font paths mutually incompatible.

So like, if there is a font in the local font path of the nested server, there is no guarantee that this font exists in the remote font path of the real server ๐Ÿ™ˆ The xlsfonts(1) client, if run on the nested server, will list fonts in the local font path โ€” and if run on the real server, will list fonts in the remote font path ๐Ÿ”

Before a font can be successfully opened by the nested server, it has to exist in local and remote font paths. It is the users' responsibility to make sure that this is the case. bestie that's on you ๐Ÿ’…

๐Ÿ”ฎ FUTURE DIRECTIONS ๐Ÿ”ฎ

  • Make dynamic the requirement for the SHAPE extension in the real server, rather than having to recompile Xnest to turn this requirement on and off.
  • Perhaps there should be a command-line option to tell Xnest to inherit the keyboard and pointer control parameters from the real server rather than imposing its own.
  • Xnest should read a customization input file to provide even greater freedom and simplicity in selecting the desired layout.
  • There is no support for backing store and save unders, but this should also be considered.
  • The proper implementation of fonts should be moved into the os layer.

๐Ÿ’€ BUGS ๐Ÿ’€

  • Doesn't run well on servers supporting different visual depths.
  • Still crashes randomly.
  • Probably has some memory leaks.

not the random crashes ๐Ÿ˜ญ we love a chaotic icon I guess ๐Ÿ’…


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Davor Matic, MIT X Consortium


๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

Xserver(1), xdpyinfo(1), X(7)


and that's the whole vibe bestie ๐ŸŽ€ this was X Version 11, xorg-server 21.1.25, and yes it's Xnest(1) โ€” go forth and nest your servers, you absolute icon ๐Ÿ’–โœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from
  • alpine 3.24: xorg-server-doc 21.1.25-r0 ยท MIT
  • arch rolling: xorg-server-xnest 21.1.25-2 ยท LicenseRef-Adobe-Display-PostScript AND BSD-3-Clause AND LicenseRef-DEC-3-Clause AND HPND AND LicenseRef-HPND-sell-MIT-disclaimer-xserver AND HPND-sell-variant AND ICU AND ISC AND MIT AND MIT-open-group AND NTP AND SGI-B-2.0 AND SMLNJ AND X11 AND X11-distribute-modifications-variant
  • fedora 43: xorg-x11-server-Xnest 21.1.25-2.fc43 ยท Adobe-Display-PostScript AND BSD-3-Clause AND DEC-3-Clause AND HPND AND HPND-sell-MIT-disclaimer-xserver AND HPND-sell-variant AND ICU AND ISC AND MIT AND MIT-open-group AND NTP AND SGI-B-2.0 AND SMLNJ AND X11 AND X11-distribute-modifications-variant
  • fedora 44: xorg-x11-server-Xnest 21.1.25-2.fc44 ยท Adobe-Display-PostScript AND BSD-3-Clause AND DEC-3-Clause AND HPND AND HPND-sell-MIT-disclaimer-xserver AND HPND-sell-variant AND ICU AND ISC AND MIT AND MIT-open-group AND NTP AND SGI-B-2.0 AND SMLNJ AND X11 AND X11-distribute-modifications-variant
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms