Run a GUI application on apphost and display it on display 0 of desk.example.net.
Which DISPLAY value is appropriate?
DISPLAY names the X server that owns the display; use desk.example.net:0 for its display 0.
Detailed explanation
DISPLAY=apphost:0Incorrect. It points to apphost rather than the workstation display.
Incorrect. It points to apphost rather than the workstation display.
DISPLAY=:desk.example.netIncorrect. The host is not placed after the colon in DISPLAY syntax.
Incorrect. The host is not placed after the colon in DISPLAY syntax.
DISPLAY=desk.example.net:0Correct. It selects display 0 on desk.example.net.
Correct. It selects display 0 on desk.example.net.
DISPLAY=0:desk.example.netIncorrect. The host and display order is reversed.
Incorrect. The host and display order is reversed.
Try it yourself
An example you can run in a temporary verification environment.
DISPLAY=desk.example.net:0; printf '%s\n' "$DISPLAY"Expected result
desk.example.net:0Key points
- DISPLAY is the destination
- host:display form
- Authentication is separate
Notes
- Environment: POSIXシェル / 外部接続なし
- 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.