Connect a new X client to display 0 and screen 0 on the local host.
Which environment assignment is conventional?
DISPLAY uses host:display.screen syntax. :0.0 means local display 0, screen 0.
Detailed explanation
XSERVER=0.0Incorrect. XSERVER is not the standard client display variable.
Incorrect. XSERVER is not the standard client display variable.
SCREEN=localhostIncorrect. SCREEN is not the standard DISPLAY variable.
Incorrect. SCREEN is not the standard DISPLAY variable.
export XAUTH=:0Incorrect. XAUTH selects authorization data, not the display destination.
Incorrect. XAUTH selects authorization data, not the display destination.
export DISPLAY=:0.0Correct. export DISPLAY=:0.0 directs clients to the local display and screen.
Correct. export DISPLAY=:0.0 directs clients to the local display and screen.
Try it yourself
An example you can run in a temporary verification environment.
DISPLAY=:0.0 sh -c 'printf "%s\n" "$DISPLAY"'Expected result
:0.0。X serverへ接続は行わないKey points
- DISPLAY
- :0.0
- host:display.screen
Notes
- Environment: shell変数展開のみ
- 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.