Before any windows can be used it is necessary to establish a connection
with a display server. A server is identified by the name of the machine it is on and
the display number on that machine. If the server name string is NULL then the contents
of the DISPLAY environment variable is substituted to determine
which display to use. The full display name has the form
Multiple screens/terminals can be controlled by a single X server as long as they are on the same
display; i.e. they are controlled with a single mouse and a single keyboard.
Display *XOpenDisplay(name) /* open a display on the named server. If successful then all the screens on the display may be used . */ char *name; /* e.g. mit-athena:0.0*/ XCloseDisplay(display) /* close a display completely */When a client's connection to a display is closed, the resources held by the server solely on the client's behalf are freed. When the last connection to the X server is closed, more resources are freed and the server does a reset.