Pages

Friday, September 27, 2013

[Linux] Run GUI on command-line-only server

Why?
When you need to connect to a linux server, which does not support GUI, to use the computational power and programs but still want to use the GUI of some programs (not the entire OS).  For example, Matlab, Eclipse.

X11 is what your want! With the help of X11, you can use run your program on a remote server but open a GUI on your client machine using the resource (X11) locally.  In short, you just need to install X11 on your client machine.

How it works?
Install X11 on your client machine, and connect to your server with a special ssh connection.

For Linux & OSX
Just add an option -X in your ssh connection command
ssh -X spencer@yourmachine.com

then you can use your program (e.g. Matlab) with a GUI in this session.
Window (via putty)
Add an option 'Enable X11 Forwarding' in the left panel























If it does not work, you need to install X11 first.  I install it via Cygwin with just several clicks while installing the packages.  Then you can try it again (still use the putty).

Your can see my another post for details of installing Cygwin.
http://spencermurmur.blogspot.tw/2013/09/windows-work-as-if-using-linux-shell.html



No comments:

Post a Comment