LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Running Matlab overnight on a remote machine (https://www.linuxquestions.org/questions/linux-newbie-8/running-matlab-overnight-on-a-remote-machine-4175608015/)

annie12391 06-16-2017 05:45 AM

Running Matlab overnight on a remote machine
 
Hi all,

I’m using Linux remotely from my Mac Terminal using SSH with X11 forwarding. I open a Matlab Command Window in Linux and run a script that takes 8 hours to complete. However when I’ve left this to run overnight, I get the ‘broken pipe’ error message, most likely due to a transient loss of connection with the server. After a bit of research I tried using ‘screen’ to get around this but I can’t get it work with Matlab running in a separate command window.

Does anyone have any ideas to keep Matlab running on Linux even if the connection from my Mac is transiently lost?

Any help would be much appreciated.

Many thanks.

pan64 06-16-2017 06:12 AM

you need local X client (on that linux box) and use VNC or similar to access it from your Mac.

rhamel 06-16-2017 06:17 AM

I'm going to suggest you run a vnc server on your remote box. Assuming it's a Linux box and not a Mac box, there are several vnc implementations you can download and run.

The one I've been using lately is x11vnchttp://www.karlrunge.com/x11vnc/, with tsvnc as the client. tsvnc connects via SSH and then on successful login, starts up x11vnc on the remote machine. Once x11vnc is started, tsvnc then starts up a vnc viewer to connect to it.

I use this and have no problem re-connecting to sessions previously started.

You can also use other vnc server implementations by logging in over SSH, starting vncserver from the CLI and then connecting using a vncviewer client to connect to the vncserver. This avoids using VNC over SSH, which is NOT a configuration I would recommend.

VNC over SSH is preferred coz the session is encrypted and can be compressed for speed as well.

In addition to VNC and VNC over SSH, there are other remote display programs I've used with varying degrees of success in the past.

These include Remote Desktop Protocol solutionshttp://www.xrdp.org/, ThinLinchttps://www.cendio.com/thinlinc/what-is-thinlinc, x2gohttp://wiki.x2go.org/.

They all require some sort of display server on the remote host with a corresponding client on the client (Mac) end.


I don't use a Mac so I can't speak for the stability of these solutions on the Mac platform, but they work fairly well on both Windows and Linux clients. So assuming you can't get one to work on Mac, there's always the possibility of running either Windows or Linux in a virtual machine on your Mac to have the client for these solutions available to you.


All times are GMT -5. The time now is 06:27 AM.