4

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?

4

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.

| 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. – Jamescun Dec 6 '12 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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