Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know that it is possible to run programs on terminal with ssh programs but is it also viable to run a program on my desktop with its GUI. For example suppose I installed Matlab on a remote machine and run it on my computer. If it is feasible, what are the methods that can be applied?

I did what the below one says but now I am getting No X11 DISPLAY variable was set error?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

You mentioned running terminal programmes over SSH, while SSH is also capable of running whole applications on a remote machine and using the GUI locally using X Forwarding.

To set up you need to enable X Forwarding in your SSH Servers configuration, add the following to your /etc/ssh/sshd_config:

X11Forwarding yes

and restart the daemon. Once enabled you can run the following on your local machine:

ssh -X user@remote-machine matlab

and you should then be able to locally use the matlab interface while all being executed on the remote machine.

Another Solution: VNC.

share|improve this answer
    
Thanks for teh answer and what if I need to execute a jar file. What is the command? –  Erogol Dec 5 '12 at 15:51
    
It should work just the same as a normal remotely executed programme. ssh -X user@remote-machine java filename.jar. –  Jamza Dec 6 '12 at 10:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.