12
$\begingroup$

I would like to prevent the welcome screen from showing up after I close my last notebook. This is not an issue on my Windows machine, so I suspect it is system dependent. I am running Ubuntu 11.10. Any ideas?

Edit 1: This only happens when I close the last notebook by clicking on the "x" button. As Szabolcs pointed out, I can avoid this issue using File -> Quit or Ctrl-Q. This seems to be a Linux-specific problem.

$\endgroup$
10
  • 2
    $\begingroup$ You can use File -> Quit to close it for good. $\endgroup$
    – Szabolcs
    Commented Mar 16, 2012 at 18:13
  • $\begingroup$ It works! I have always assumed that clicking on the "x" button is equivalent to "Quit" (or Ctrl-Q) from the pull-down menu. From now on I will use the Ctrl-Q shortcut. $\endgroup$ Commented Mar 16, 2012 at 18:22
  • $\begingroup$ @Szabolcs Could you write something down in the answers section so that I can mark this question as answered? $\endgroup$ Commented Mar 16, 2012 at 18:26
  • 1
    $\begingroup$ @R.M How can I disable the welcome screen for good? $\endgroup$ Commented Mar 16, 2012 at 20:08
  • 1
    $\begingroup$ This is especially annoying because the welcome screen takes like 2 seconds to load. $\endgroup$ Commented Nov 4, 2012 at 7:25

3 Answers 3

8
$\begingroup$

The screen won't show when you use File | Quit, or you can use the shortcut Ctrl+Q.

I actually wrote the Wolfram support about this issue, the response said that that window opening is the desired behavior and it's thought to be somewhat of a substitute of not having the "main bar" the Windows version has. In that sense, it is not intended that closing all notebooks also shuts down Mathematica (plus kernel). When I told him that it's a bug unless you can disable it, I was told he'll bring the idea up for development at some point. Oh well.

$\endgroup$
1
  • $\begingroup$ Yeah, users have no idea about UX … Thanks for reporting a bug! $\endgroup$ Commented Feb 18, 2013 at 16:53
11
$\begingroup$

Upon closing the last notebook Mathematica opens the notebook file MathematicaNavigator.nb or MathematicaNavigatorTrial.nb (if you are using a trial version) or MathematicaNavigatorStudent.nb (if you are using a student version). These files reside in [prefix]/Wolfram/Mathematica/8.0/SystemFiles/FrontEnd/TextResources. That path name is hardcoded into the Mathematica binary. If Mathematica 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 sure 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 by using Edit | Preferences | System | Show at startup -> New document, back up the existing MathematicaNavigator.nb in case something goes wrong. Delete all code from MathematicaNavigator.nb and replace it with the following:

Notebook[{
    Cell["", "", CellDynamicExpression :>
        FrontEndTokenExecute["FrontEndQuit"]] 
}]

Basically, this represents a notebook with an empty cell having a dynamic handler. It activates when the cell is displayed to user. The handler FrontEndTokenExecute["FrontEndQuit"] just sends the Mathematica FrontEnd a quit message, just as if you had 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 diplayed. I believe, this code could be improved to correctly detect circumstances under which MathematicaNavigator.nb was called.

$\endgroup$
10
$\begingroup$

Update: Mathematica 10 seems to have resolved this issue, via the "Always Exit after closing last window" option in Preferences->Interface. David, it looks like they actually listened to your suggestion!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.