Prevent 10.2 from creating "Wolfram Mathematica" directory on Linux
The "Wolfram Mathematica" directory is created automatically by the front-end and is located in $UserDocumentsDirectory
.
It is the default directory to save new documents in and also is on TrustedPath
.
The typical location for Linux systems is $HOME/Documents
, however it may happen to fall back on $HOME
depending on the Xdg user directories setting. This can be changed by
xdg-user-dirs-update --set DOCUMENTS AnyDesiredDirectorywhich can prevent the home directory cluttering behavior by using another location.
Indeed this is annoying. In my ~/.Mathematica/Kernel/init.m
I have placed this removal code:
With[{dir = $UserDocumentsDirectory <> "/Wolfram Mathematica"},
If[DirectoryQ[dir], DeleteDirectory[dir]]
]