how to use matlab remotly
Show older comments
Hi all
I will be accessing my work computer from home and i need to make some graphs , ( dont have matlab in my home computer) but i do in my work computer. also i am using linux
i was wondering does anybody know how to do that 1: run matlab in the work computer while accessing form home 2 if i have a script . can i use it and how do i run it.
Any help will be appreciated thank you
Sara
Accepted Answer
More Answers (4)
the cyclist
on 21 Jul 2011
0 votes
I assume your work machine is on a network. Are you able to use a virtual private network (VPN) to connect your home machine to that network? That is probably the most common practice these days.
There is also something called "remote desktop protocol" that you can use. I've only done it from a PC, but I think you can do it from Unix as well.
Also, although I have not done it, you can run MATLAB remotely via smart phone app now.
1 Comment
Sean de Wolski
on 22 Jul 2011
I can do that with Macintosh and I do. The ML window tends to be a little fuzzy but I think that's just the graphics card.
sara
on 21 Jul 2011
0 votes
1 Comment
Jason Ross
on 22 Jul 2011
I assume you mean "can not see the display"? If you want to see plots, you need to use VNC Server on the Linux host and connect to that VNC session from your home PC.
Jason Ross
on 22 Jul 2011
0 votes
How I remotely connect to a Linux machine from a Windows machine over VPN. I am assuming your home machine is Windows -- but these steps are the same for any arbitrary VNC client, be it on Windows, Linux or Mac.
- Make a VPN connection.
- Open a terminal to the Linux host from your Windows machine. This is likely done with PuTTY/ssh.
- Type "startvnc". This will start the VNC server. In the output, you will see the desktop name that has been started -- something like "my-linux-host:2"
- Using a VNC client on the Windows machine, connect to the VNC desktop session you started.
- Start MATLAB in this session. Ideally this will load with the same desktop environment that you are used to.
I like using VNC versus forwarding X, as the VNC method keeps your session running even when you lose network connectivity, which can and does happen for any number of reasons. It's also faster and more responsive, for the most part, for the reasons Walter already mentioned. I've also found that it can help immensely to play around with the VNC settings and try a couple of different VNC clients -- some behave better than others connecting to some systems.
A word of caution, though -- VNC is not the most secure protocol in the world. If you work for a company/institution that is extremely sensitive about network security, it would behoove you to ask for the "proper" way to do this, as there are ways to make things more secure, but they require more setup.
Bjorn Gustavsson
on 22 Jul 2011
0 votes
Also if you run long sessions from Linux/UNIX/(Mac?) over network you have to guard yourself from time-outs that close the connection. Do this by running matlab from inside 'screen'. Then you can dettach and reattach the matlab session without losing it.
2 Comments
sara
on 22 Jul 2011
Bjorn Gustavsson
on 22 Jul 2011
From an terminal start screen, then start matlab (I guess you migh have to run it without the desktop so: matlab -nodesktop). Then you should be able to run everything just as usual. When you "need" to detach it is just to hit Control-a Control-d. Then to reattach I usually have to check for what screen session to reattach by typing: screen -ls to list the current "screens"; then to reattach it is just to type: screen -d -r ; possibly with the pid.tty number: screem -d -r pid.tty.host.
Should work.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!