8
$\begingroup$

I would like to add a trusted a path in the global preferences of Mathematica. When I go to NotebookSecurityOptions, click the tool button for TrustedPath, and click 'Add', a dialog box appears and asks for a path.

After reading the official documentation on Notebook Security, I still have no idea how to enter a simple, specific path (eg ~/Desktop) into that box. I can't find a documentation for the Filename function as well, so I'm left with just guesswork. I have tried several guesses in vain.

$\endgroup$
1

3 Answers 3

9
$\begingroup$

You have to go down through quite a few dialogs to select a directory path.

  1. Select the System tab in the Preferences dialog.
  2. Click on Edit Trusted Directories....
  3. The Trusted Directories dialog appears. Click on Add.
  4. A nameless dialog appears. Click on Browse....
  5. A Selecte a Folder dialog appears. Navigate in that dialog to the parent directory of directory you want to add. Select the directory. Click on Choose.

TrustedPath

$\endgroup$
1
  • $\begingroup$ This should have been mentioned in the official documentation on Notebook Security. $\endgroup$
    – Taiki
    Commented Jul 21, 2013 at 23:00
5
$\begingroup$

You should be able to just use ~/Desktop, or perhaps /Users/Taiki/Desktop.

The interface is a little nicer through the System tab of the Preferences dialog. There you get the option to browse to a directory in addition to just typing in a path.

$\endgroup$
3
$\begingroup$

You can do it programmatically:

SetOptions[$FrontEnd, 
  "NotebookSecurityOptions" -> {"TrustedPath" -> Append[
       CurrentValue[$FrontEnd, {"NotebookSecurityOptions", "TrustedPath"}],
       {"C:\\Whatever\\Test", "D:\\Something\\Subdir"}]}];

though the confirmation dialog will still pop up for you to accept changes.

In any case (using the options interface or doing it the above way) you can enter the absolute full path of your directory in the way you would use it otherwise in Mathematica in your OS.

$\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.