Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Based on certain previous questions, I figured that if my NotebookBrowseDirectory looked like this

Options[$FrontEnd, NotebookBrowseDirectory]
{NotebookBrowseDirectory -> "/Users/brian/mma"}

then the OSX front end would default to saving new notebooks there. Instead it defaults to saving them in the home directory /Users/brian. Does there exist a variable I can set to make the UI default to saving into a different directory from my homedir?

share|improve this question
SetDirectory[dir] sets the current working directory to dir –  acl Dec 2 '12 at 2:58
NotebookBrowseDirectory works on Windows and Linux, but on Mac, we allow the operating system to assert its natural behavior over such things. I'm not now so convinced that this was a good idea, but I haven't finished a proper investigation. So, it's possible this behavior will change in the future. –  John Fultz Dec 2 '12 at 8:22
@John Fultz I am glad that Mathematica integrates so nicely with OSX. In my opinion it is a elemental feature of OSX that usage of system wide GUI-logic is encouraged and that most programmes out there play within the 'rules'. Examples where custom interfaces are used (e.g. ditching the top menu bar of OSX - like Matlab does) turn out pretty bad in like 99% of the time and just ruin user experience. –  Sascha Dec 2 '12 at 10:39
So would an init.m with a SetDirectory[] command work to do more or less what I want? –  Brian B Dec 2 '12 at 20:23
No, what Nasser was suggesting was the opposite of what you're asking. Since the Kernel and FrontEnd are separate processes in the OS, each has its own notion of the "current directory". SetDirectory sets the current directory for the Kernel. NotebookBrowseDirectory would set this for the front end, but as John points out above the OSX FrontEnd currently ignores that. –  Itai Seggev Dec 4 '12 at 4:13
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.