LPI
117-102 · Question #729
Which of the following lines is an example of a correct setting for the DISPLAY environment variable?
The correct answer is B. hostname:displaynumber. See the full explanation below for the reasoning.
Question
Which of the following lines is an example of a correct setting for the DISPLAY environment variable?
Options
- Ahostname:displayname
- Bhostname:displaynumber
- Chostname/displayname
- Dhostname/displaynumber
- Ehostname
How the community answered
(45 responses)- A7% (3)
- B76% (34)
- C2% (1)
- D2% (1)
- E13% (6)
Community Discussion
3The answer is B, hostname:displaynumber, because DISPLAY uses a COLON to separate the host from the display number, so think of it as "host COLON display" just like you COLON-ize your coffee mug with your name at the office to claim your screen. The slash options C and D are traps, displayname is a fake field that does not exist, and a bare hostname with nothing after it tells X absolutely nothing about which display to use.
22
A fooled me first, but it takes a number, so B.
4
A trips people up because "name" sounds reasonable, but DISPLAY takes a number, not a name. B.
1