nerdexam
CompTIA

LX0-104 · Question #486

Which of the following lines is an example of a correct setting for the DISPLAY environment variable?

The correct answer is B. hostname:displaynumber. The DISPLAY environment variable specifies the X server to connect to, using a format that includes the hostname and display number.

User Interfaces and Desktops

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

(54 responses)
  • A
    2% (1)
  • B
    94% (51)
  • C
    4% (2)

Why each option

The DISPLAY environment variable specifies the X server to connect to, using a format that includes the hostname and display number.

Ahostname:displayname

displayname is not the standard term for the numeric identifier of a display; it should be a number.

Bhostname:displaynumberCorrect

The correct format for the DISPLAY environment variable is [hostname]:display_number[.screen_number]. hostname:displaynumber accurately represents a valid setting, where display_number identifies a specific display on the host, typically starting from 0.

Chostname/displayname

The / character is not used as a separator in the DISPLAY variable; a colon : is used.

Dhostname/displaynumber

The / character is not used as a separator in the DISPLAY variable; a colon : is used.

Ehostname

Simply providing a hostname is insufficient as it does not explicitly specify which display on that host to use, though it might implicitly default to display 0.

Concept tested: X Window System DISPLAY variable

Source: https://www.x.org/releases/X11R7.6/doc/man/man7/X.7.html

Topics

#DISPLAY environment variable#X Window System#remote display

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice