From https://unix.stackexchange.com/a/17278/674
If you run
ssh -X localhost, you should see that$DISPLAYis (probably)localhost:10.0. Contrast with:0.0, which is the value when you're not connected over SSH. (The.0part may be omitted; it's a screen number, but multiple screens are rarely used.) There are two forms of X displays that you're likely to ever encounter:
- Local displays, with nothing before the
:.- TCP displays, with a hostname before the
:.With
ssh -X localhost, you can access the X server through both displays, but the applications will use a different method::NUMBERaccesses the server via local sockets and shared memory, whereasHOSTNAME:NUMBERaccesses the server over TCP, which is slower and disables some extensions.
What are the relations and differences between X server, display and screen?
What does "the X server through both display" mean? Does a "display" means a display server, i.e. an X server, so two "displays" means two display servers, i.e. two X servers.
What does "multiple screens" mean? Does a "screen" mean a display monitor?
Thanks.