Message Boards Message Boards

Preventing creation of "Wolfram Mathematica" directory on MacOS

Posted 4 years ago

When Mathematica launches, it always creates a ~/Documents/Wolfram Mathematica directory.

I've already tried editing ~/Library/Mathematica/FrontEnd/init.m with:

NotebookBrowseDirectory->"/Users/myusername/Documents/Wolfram",

But the "Wolfram Mathematica" dir still gets created.

It's an issue that's quite a few years old with no apparent solution and it doesn't appear the Mathematica folks have an interest in addressing this ongoing annoyance unfortunately. I first attempted to fix this a few years ago and didn't make any progress.

Wondering if anyone out there has found any hack to deal with this.

Thanks!

POSTED BY: Eduard Rozenberg
Posted 3 years ago

Thi topic has been discussed at

https://mathematica.stackexchange.com/questions/89369/prevent-10-2-from-creating-wolfram-mathematica-directory-on-linux

which suggests adding to ~/Library/Mathematica/Kernel/init.m

With[{dir = FileNameJoin[{$UserDocumentsDirectory,"Wolfram Mathematica"}]},
  If[DirectoryQ[dir], DeleteDirectory[dir]]]

This is suboptimal, as the directory still gets created at startup only to be deleted immediately afterwards.

I reported this to customer support back in 2015, who answered that this is the new default directory which notebooks are saved to and that this is the only directory outside of $InstallationDirectory that is trusted by default. They wrote the creation of this directory cannot be turned off, and didn't seem keen to consider altering this behaviour. No change since then.

I tried removing the entry (which I think correspond to this)

FrontEnd`FileName[{FrontEnd`$ApplicationDocumentsDirectory}]

from the Trusted Directories in Preferences > Security, to no effect.

In my opinion ~/Documents is private user territory, which no app should write to unless explicitly asked by the user. This is where I put my papers, communications, theses, proposals, reports, research projects, organised by project not by app, namely one project directory contains all the documents associated with this project irrespective of the app used to create them. All my Mathematica documents start with

SetDirectory[NotebookDirectory[]]

I'm looking for a way to (1) either prevent the creation of ~/Documents/Wolfram Mathematica or (2) relocate it permanently to ~/Wolfram Mathematica, similar to ~/Movies, ~/Music, ~/Pictures. MATLAB authorises ~/Documents/MATLAB to be relocated to ~/MATLAB by changing userpath. It feels unfair Mathematica doesn't allow the same.

POSTED BY: Bruno Voisin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract