From https://unix.stackexchange.com/a/17278/674
> If you run `ssh -X localhost`, you should see that `$DISPLAY` is
> (probably) **`localhost:10.0`**. Contrast with **`:0.0`,** which is the value
> when you're not connected over SSH. (The `.0` part 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: `:NUMBER`
> accesses the server via local sockets and shared memory, whereas
> `HOSTNAME:NUMBER` accesses the server over TCP, which is slower and
> disables some extensions.
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 `$DISPLAY` shows the X server used by the X clients invoked in the ssh session?
What does `10` and `0` mean?
on machine C,
$ netstat -lnt | awk '
sub(/.*:/,"",$4) && $4 >= 6000 && $4 < 6100 {
print ($1 == "tcp6" ? "ip6-localhost:" : "localhost:") ($4 - 6000)
}'
localhost:10
ip6-localhost:10
Does it list all the remote X servers for any X clients running on machine C?
What does `10` mean?
Does `10` in both outputs mean that the X server running on machine B is listening at port number `6000+10=6010`?
Thanks.