Display Server – Does it Start in a Display, Screen, or Monitor?

displayx11

  1. https://unix.stackexchange.com/a/503874/674 says

    The display is effectively the X server; there is exactly one display per X server. So multiple X servers can’t run simultaneously
    on the same display, and an X server can’t run simultaneously on
    multiple displays. (Strictly speaking, the latter point isn’t
    correct, but I don’t think there’s an X server which can serve
    multiple displays.)

    https://www.x.org/archive/X11R6.8.0/doc/X.7.html#sect4 says a
    display can have multiple screens/monitors. $DISPLAY specifies a
    screen, not just a display, and is used in starting a X server or a
    X client. So does a X server start in a display or a screen? So
    does a X server start in a display or a screen?

  2. https://unix.stackexchange.com/a/503884/674 has a diagram that

    • distinguishes screen and monitor, while https://www.x.org/archive/X11R6.8.0/doc/X.7.html#sect4 seems to say
      they are the same concept when explaining screen number. Which one is correct?

    • shows a X server covers all the screens in a display. So does a display server start in a display or a screen or a monitor?

  3. Can I specify an arbitrary `$DISPLAY`?
    says:

    An xserver can use a hardware framebuffer, a dummy framebuffer (Xvfb) or a window on another xserver (Xephyr). The latter two are
    examples of "virtual" xserver/display

    Is a framebuffer associated with a display or a screen or a monitor?

Sorry I am still confused by the multiple concepts. Thanks.

Best Answer

So does a X server start in a display or a screen?

I’m not sure how to say this in a different way than I did previously; for all intents and purposes, the X server is a display (“display” as the X Window concept, which I understand is what we’re discussing here). An X server doesn’t start in a display, it is a display. You can think of this as “an X server starts a display”, and “a display contains one or more screens”.

The DISPLAY variable can be confusing since, as you say, it can specify more than the X display.

Which one is correct?

The diagram; see the explanation below.

Does a display server start in a display or a screen or a monitor?

In the X Window documentation, “display server” is synonymous with X server, so the above applies.

It may help to consider that the X Window documentation was written a long time ago, at a time when virtual displays weren’t used (much, if at all), and when multi-monitor setups were complex and often involved multiple X screens, and sometimes even multiple X servers. So in the X documentation, a screen is usually a monitor. However it quickly became obvious that it was annoying to split multiple monitors into multiple screens, and once graphics cards became capable of handling multiple monitors as a single unit, usage patterns changed so that X screens tended to cover multiple monitors.

Is a framebuffer associated with a display or a screen or a monitor?

“Framebuffer” is a somewhat nebulous term, with multiple definitions. In the context of the comment you’re quoting, it’s associated with a screen, and you can see this with Xvfb: if you tell it to use memory-mapped files for its framebuffers, and define multiple screens, you’ll see it use one framebuffer file per screen.

Related Question