Connect an X client to local display 0, screen 1.
What should DISPLAY contain?
DISPLAY generally has host:display.screen syntax; :0.1 means local display 0 and screen 1.
Detailed explanation
0:1Incorrect. It lacks the required host/display separator for this local form.
Incorrect. It lacks the required host/display separator for this local form.
:0.1Correct. :0.1 selects local display 0 and screen 1.
Correct. :0.1 selects local display 0 and screen 1.
:1.0Incorrect. :1.0 selects display 1, screen 0.
Incorrect. :1.0 selects display 1, screen 0.
localhost.0:1Incorrect. It uses the host:display.screen order incorrectly.
Incorrect. It uses the host:display.screen order incorrectly.
Try it yourself
An example you can run in a temporary verification environment.
DISPLAY=:0.1; printf '%s\n' "$DISPLAY"Expected result
:0.1Key points
- Colon separates host and display
- Period selects screen
- Omitted host means local
Notes
- Environment: POSIXシェル / DISPLAY文字列のみ検証
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.