102-500 · Question #26
On a machine running several X servers, how do programs identify the different instances of the X11 server?
The correct answer is B. By a display name like: 1. Programs on a machine with multiple X servers identify each instance using a display name in the format :DISPLAY_NUMBER (e.g., :0, :1, :2), set via the DISPLAY environment variable - so option B is correct. The full syntax is hostname:display.screen, but the display number is…
Question
Options
- ABy a fixed UUID that is defined in the X11 configuration file.
- BBy a display name like: 1.
- CBy the name of the user that runs the X server like x11:bob.
- DBy a device name like /dev/X11/xservers/1.
- EBy a unique IPv6 address from the fe80::/64 subnet.
How the community answered
(51 responses)- A6% (3)
- B78% (40)
- C12% (6)
- D2% (1)
- E2% (1)
Explanation
Programs on a machine with multiple X servers identify each instance using a display name in the format :DISPLAY_NUMBER (e.g., :0, :1, :2), set via the DISPLAY environment variable - so option B is correct. The full syntax is hostname:display.screen, but the display number is the key distinguishing identifier, and :1 alone is a valid shorthand for the local machine.
Why the distractors fail:
- A - X11 uses no UUID; configuration files define behavior, not instance identity.
- C - Multiple users can run X servers, and a single user can run several; usernames don't uniquely identify instances.
- D - X11 is a network protocol, not a device-file model; there's no
/dev/X11/xservers/path. - E - While X11 can run over a network (including IPv6), instances are not identified by IP addresses - display numbers serve that role regardless of transport.
Memory tip: Think of the colon as X11's "channel selector" - :0 is channel 0, :1 is channel 1. Just like a TV with multiple inputs, each X server gets its own numbered display, and you "tune in" by setting DISPLAY=:1 before running your program.
Topics
Community Discussion
No community discussion yet for this question.