Upon closing the last notebook MathematicaMathematica opens the notebook file MathematicaNavigator.nb
(oror MathematicaNavigatorTrial.nb
in case if(if you are using a trial version,) or MathematicaNavigatorStudent.nb
in case of(if you are using a student version) which resides. These files reside in [prefix]/Wolfram/Mathematica/8.0/SystemFiles/FrontEnd/TextResources
. That path name is hardcoded in Mathematicainto the Mathematica binary. If MathematicaMathematica really doesn't have an option to disable the welcome screen completely (it likely doesn't), the only solution I see is to modify the contents of MathematicaNavigator.nb
to make it exit Mathematica immediately. Before proceeding with modifying that file, be shuresure to disable the display of the welcome screen at startup time.
After you have disabled the welcome screen at startup, either by unchecking "Show at startup" checkbox on the startup screen or inby using Edit | Preferences | System | Show at startup -> New document
, back up oldthe existing MathematicaNavigator.nb
in case something goes wrong. Delete all code from MathematicaNavigator.nb
and put there next four linesreplace it with the following:
Notebook[{
Cell["", "", CellDynamicExpression :>
FrontEndTokenExecute["FrontEndQuit"]]
}]
Basically, this represents a notebook with onean empty cell withhaving a dynamic handler. It activates when the cell is displayed to user. HandlerThe handler FrontEndTokenExecute["FrontEndQuit"]
just sends Mathematicathe Mathematica FrontEnd a quit message, just like whenas if you hit Ctrl+Qhad given the Ctrl+Q
shortcut. By the way, calling NotebookClose[]
instead of FrontEndTokenExecute["FrontEndQuit"]
will always crash Mathematica with SIGSEGV on my machine (Mathematica 8.0.4.0 / Debian Wheezy 64-bit).
Another side effect is an immediate exit when About | Welcome screen
is useddiplayed.
I I believe, this code could be improved to correctly detect circumstances under which MathematicaNavigator.nb
was called.