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.
If you just want to run firefox, do you need a desktop at all? You could just run firefox on its own over ssh and a local X server. – Paul – 2012-04-14T09:23:08.597
HI Paul. I guess what you are talking about is what I am really looking for. I Just found this article: http://www.tjansson.dk/?p=163 Could you please refer other materials to me? Also, If I use your method, can I upload videos from that server to sites like youtube? The videos are on that server not my computer. Thanks a lot!
– Susan Mayer – 2012-04-14T10:06:37.483Midori is pretty lean and fast. Comes by default on Slitaz linux which is a very lean distro. Midori is available on the Ubuntu repository. – BJ292 – 2012-04-14T10:14:44.647