I am trying to do some X11 forwarding and I got completely lost. I found very good answers explaining the theory:
- What is the $DISPLAY environment variable?
- https://unix.stackexchange.com/questions/17255/is-there-a-command-to-list-all-open-displays-on-a-machine
- https://superuser.com/questions/368530/understanding-x-windows-display-environment-variable-when-tunnelling
But I'm still straggling when applying it in practice.
Here is what I did:
- Opened
mobaxtermwhich creates a X server on my machine (Windows, shouldn't matter). ssh -X server1echo $DISPLAYgiveslocalhost:10.0xeyes- opens a window on my local machine. Great, but why doeslocalhostdirect to my machine? Shouldn't it beserver1?
As far as I understand localhost is equal to 127.0.0.1 which is the local address. So if I'm connected to server1 shouldn't it look for X-server on server1?