The link you posted provides what you need.
Xming is an X server that runs on Windows, and so can accept the output from graphical applications instead of to a local X server on the server itself.
When you do ssh -X hostname
or use putty from Windows and enable X forwarding in the SSH options, the ssh session that is established has a "tunnel" created between the server and the Windows machine over which it pushes the graphic output from any processes that are run in that ssh session.
Once you are connected to the server, you should see the DISPLAY
variable is pointing back to itself, but on a different port:
$ echo $DISPLAY
localhost:10.0
The 10
here corresponds to tcp port 6010 (usually), which we can see using netstat:
$ sudo netstat -pan | grep 6010
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 6031/0
This shows us a local listener on port 6010, that is owned by process 6031 in this case:
$ ps auwx | grep 6031
user 6031 0.0 0.1 9340 1960 ? S 21:57 0:00 sshd: user@pts/0
And we can see that this is owned by the pts terminal created by the ssh session. This is all just background, but what it is saying is that any graphics will be sent to a port created by the ssh session and forwarded over the tunnel back to the calling machine. This is the Windows box, and it is running Xming, so will take receipt of the graphics session and display it locally.
Note that this is just graphics output. The process is still running on the server and any interactions it has are with the server, it is just the output from that process that is forwarded over the tunnel.
So if you then kick off firefox from the command line, its output will get displayed on the Windows machine.
So yes, when you do a file dialog in firefox, this is from the perspective of the server, not the Windows machine. So any uploads you want to do will be from the server filestore.
This way removes all of the overhead of the desktop environment, and just runs the application.