When using ssh -X is the executable copied and run locally or is it run on the host machine. Since it is called X11 forwarding it makes me think that the window is drawn on my machine but running on the host.
|
|
|||||||||
|
|
The executable is run on the remote machine and displayed (drawn) on the local machine. What Unlike Windows, Mac OS, etc, X11 was designed from the beginning to be able to run programs across a network, without needing things like remote desktop. For a while, X11 thin clients were popular. It is basically a stripped down computer that only runs a X11 server. All of the programs run on some application server somewhere. |
|||||||||||
|
|
The application runs remotely, except the X components (i.e. rendering the x-commands etc) which are running locally. Every client application usually uses the local X server to display the UI. In this case, the commands are send via the encrypted SSH channel from the remote machine to your local machine and are displayed there. |
|||
|
|
|
That's right, the application is ran on the host while displayed on the local machine. |
|||
|
|
|
Setting |
|||
|
|
|
The key may be to realize that the X server is a single thing which provides graphics to a user, and all the different programs which want graphics have to be X clients and connect to a server. The interface between client programs and the X server was designed from the start to support connections with remote programs, not just those on the local machine. In a crazy enough network, a program could be run anywhere and display its graphics anywhere else... |
|||
|
|