user806167
user806167

Reputation: 41

Remotely Connect to Matlab

How can I use GUIs of different applications remotely? Maybe called X forwarding? I am trying to remotely connect to Matlab from my ubuntu laptop. I use matlab -display xdisplay

but I get, unable to open xdisplay

Can you help? Thanks.

Upvotes: 2

Views: 6712

Answers (2)

Egon
Egon

Reputation: 4787

This really depends on what you use to connect to your remote workstation.

As MachineCharmer suggests, you could use VNC (or RDP, TeamViewer, ...), but in most Linux systems, there is already a mechanism in place to do what you want (i.e. "X forwarding"). Advantage of X over ssh is the fact that it is highly likely to work on any Unix system, VNC and others obviously require you to install the software. On the other hand, RDP is built-in in Windows (at least in the professional versions). Also note: if you want to forward X over ssh to a Windows computer, you need a running X server on Windows (e.g. Xming).

Either you run an ssh session with X forwarding from which you start matlab, or you can also instruct ssh to start matlab directly. The second approach is handy if you only want to use matlab on the remote computer and have the session shut down when you exit matlab.

First approach (for the case your local machine is name local and your server is named remote

user@local$ ssh -X remote
user@remote$ matlab -desktop

Second approach:

user@local$ ssh -X remote "matlab -desktop"

You can find more information in the ssh man page (or type man ssh in your terminal). Some people e.g. advice to use -c blowfish for remote display sessions, as this is a faster cipher.

If you want more information on how to run matlab, the information is available in the matlab help. By default you do not need to specify the X display, by default the DISPLAY environment variable is consulted. (you can do so yourself by typing echo ${DISPLAY} into your shell. Most likely this will yield something like :0.0 (for your local machine).

Upvotes: 10

Pratik Deoghare
Pratik Deoghare

Reputation: 37172

Try VNC.

Upvotes: 1

Related Questions