Please forgive the cross-post from matlab answers. This received no response over there. I'll try to go into a bit more detail with this post.
I run matlab through emacs using matlab-emacs. I do this on a subnode of a cluster computer. I have no problems running emacs with the following set of commands, from my laptop computer.
ssh host1
ssh node005
emacs
and then in emacs I run matlab-shell and matlab runs untill I disconnect my laptop. I would like, however, to be able to disconnect my laptop that I use to run matlab and leave a job running. My non successful attempt has so far been to
ssh host1
ssh node005
screen -S sheep
and then in screen I run
emacs --daemon
and then connect to it with
emacsclient -nc
I can run matlab within the emacs client (again with matlab-shell). However when I disconnect from the screen session
ctrl-a d
and then reconnect
screen -r sheep
emacsclient -nc
And then look at the matlab shell which was already running, I see that my job has teminated and the message
M-Shell exited abnormally with code 1
Why does matlab crash when I detach this screen session? How does it even know I have detached? Alternatively, perhaps there is a better way I can run matlab in the background (besides vnc, which I am using now but has its own set of bugs). Please let me know if I can provide any other information that might help.
Note that this post follows emacsclient connection refused and I am running things as I am essentially in response to that earlier discussion.
edit: there is a description of this set-up allegedly working for someone here: http://sourceforge.net/p/matlab-emacs/mailman/message/31704641/