0
  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.

  • 1
    Then what have YOU go through in your mind? Basically nothing and just waiting for answer? – 炸鱼薯条德里克 Mar 13 at 14:11
  • 1
    Good question includes your own efforts – 炸鱼薯条德里克 Mar 13 at 14:20
3

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.

  • 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? – Tim Mar 13 at 22:52
  • Thanks. I maybe wasn't clear about my first two questions. Now I updated my post, trying to be clearer. – Tim Mar 13 at 22:56
  • Is that true your web browser doesn't render italic font at all? If so, does it render capitalized English letters? @Tim – 炸鱼薯条德里克 Mar 14 at 0:24
  • @Tim, you’ve asked “So does a X server start in a display or a screen?” four times now (twice in your question, twice in your comment). What do you not find clear when I say “An X server doesn’t start in a display, it is a display.”? Your question is like asking if a crayon is in a pencil. – Stephen Kitt Mar 14 at 6:34
  • @Tim assuming an Xserver with multiple "screens" (multiple monitors are nowadays managed as part of the same screen via xrandr): an application that successfully connected to a X11 server via DISPLAY=:0.1 is not forced to use just screen 1: the screen part of the display spec only determines what screen will be the default, ie what DefaultScreen(dpy) and DefaultScreenOfDisplay(dpy) will return. – mosvy Mar 14 at 7:42
2

As you been told the 1000th time, the display IS the X server. So "X server run in a display" makes no sense.

X document use "display" to refer a bunch of hardware because in the old time, X servers usually(if not always) take control of and render to real hardware, but nowadays, many modern servers are able to run on and render to non-real(virtual) hardware-based target, e.g. Xephyr or Xvfb or Xorg with dummy video driver. The document don't get update very often, but it's not proper to say "A display is a bunch of hardware" on modern systems, it would be much better to say "A display is a running X server process".

An X server listens on an address(es), this address(es) can be connected using X11 protocol. How the X11 protocol data is transported is purely a platform specific thing, it could be a pair of TCP sockets, a TCP socket on the posix server side and a magic object on the non-posix client side(basically any two connected TCP endpoint), a pair of locally connected UDS(basically any two connected IPC endpoint, in which case X window system may become more powerful and efficient because the client and server run on the same machine, things like DRI becomes possible).

An X server might run multiple X screens(not to be confused with real-life monitors), and might handle multiple framebuffer (no matter real GPU framebuffer or malloc() buffer or mmap() disk-file memory space region), frambuffers doesn't have strict mapping with X screens, depends on your driver, settings, and which kind of X server you use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.