Add infos about the creation of a shutdown script for Matlab.
PR: docs/59240 Submitted by: Dan Pelleg <daniel+handbook@pelleg.org>
This commit is contained in:
parent
9f8da68de5
commit
48933bc8ec
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=18829
1 changed files with 45 additions and 11 deletions
|
@ -859,21 +859,55 @@ exit 0</programlisting>
|
||||||
</tip>
|
</tip>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
<sect2>
|
||||||
|
<title>Creating a &matlab; Shutdown Script</title>
|
||||||
|
|
||||||
|
<para>The following is needed to solve a problem with &matlab;
|
||||||
|
not exiting correctly.</para>
|
||||||
|
|
||||||
|
<procedure>
|
||||||
|
<step>
|
||||||
|
<para>Create a file
|
||||||
|
<filename>$MATLAB/toolbox/local/finish.m</filename>, and
|
||||||
|
in it put the single line:</para>
|
||||||
|
|
||||||
|
<programlisting>! $MATLAB/bin/finish.sh</programlisting>
|
||||||
|
|
||||||
|
<note><para>The <literal>$MATLAB</literal> is
|
||||||
|
literal.</para></note>
|
||||||
|
|
||||||
|
<tip>
|
||||||
|
<para>In the same directory, you will find the files
|
||||||
|
<filename>finishsav.m</filename> and
|
||||||
|
<filename>finishdlg.m</filename>, which let you save
|
||||||
|
your workspace before quitting. If you use either of
|
||||||
|
them, insert the line above immediately after the
|
||||||
|
<literal>save</literal> command.</para></tip>
|
||||||
|
</step>
|
||||||
|
|
||||||
|
<step>
|
||||||
|
<para>Create a file
|
||||||
|
<filename>$MATLAB/bin/finish.sh</filename>, which will
|
||||||
|
contain the following:</para>
|
||||||
|
|
||||||
|
<programlisting>#!/usr/compat/linux/bin/sh
|
||||||
|
(sleep 5; killall -1 matlab_helper) &
|
||||||
|
exit 0</programlisting>
|
||||||
|
</step>
|
||||||
|
|
||||||
|
<step>
|
||||||
|
<para>Make the file executable:</para>
|
||||||
|
|
||||||
|
<screen>&prompt.root; <userinput>chmod +x $MATLAB/bin/finish.sh</userinput></screen>
|
||||||
|
</step>
|
||||||
|
</procedure>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
<sect2 id="matlab-using">
|
<sect2 id="matlab-using">
|
||||||
<title>Using &matlab;</title>
|
<title>Using &matlab;</title>
|
||||||
|
|
||||||
<para>At this point you are ready to type
|
<para>At this point you are ready to type
|
||||||
<command>matlab</command> and start using it. Note that the
|
<command>matlab</command> and start using it.</para>
|
||||||
version of <application>&java;</application> shipped with
|
|
||||||
<application>&matlab;</application> does not work well under
|
|
||||||
&os;. It will make it hard to quit
|
|
||||||
<application>&matlab;</application> and you will have to
|
|
||||||
<command>kill -9</command> it. If you do not use
|
|
||||||
<application>&java;</application> at all, you can avoid this
|
|
||||||
nuisance by starting
|
|
||||||
<application>&matlab;</application> with the
|
|
||||||
<option>-nojvm</option>
|
|
||||||
switch.</para>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue