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?
On machine B,
$ ssh -X t@C` $ echo $DISPLAY localhost:10.0`Does
$DISPLAYidenfity the X server used by the ssh session? What does10and0mean?on machine C,
$ netstat -lnt | awk ' sub(/.*:/,"",$4) && $4 >= 6000 && $4 < 6100 { print ($1 == "tcp6" ? "ip6-localhost:" : "localhost:") ($4 - 6000) }' localhost:10 ip6-localhost:10Does it list all the remote X servers used by the X clients running on machine C? What does
10mean?Does
10in both outputs mean that the port of the X server running on machine B is6000+10=6010?Where can I find the hostname or IP address of the remote X server?
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.