Message Boards Message Boards

0
|
3519 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Changing $UserBasePacletsDirectory

Is it possible/advisable to change the value of $UserBasePacletsDirectory?

The reason I ask is that I want to present packages and related resources as paclets. But I'd like to place the paclets in my Dropbox folder so they are automatically synced across both the computers I use (and also backed-up). If I were to change $UserBasePacletsDirectory, I recognise that I'd have to move its entire contents (which wouldn't be a problem).

However, I notice that $UserBasePacletsDirectory has the attribute 'Protected' so I'm wary about changing its value in case so doing results in undesirable side effects.

Any advice or suggestions in respect of the above would be much appreciated.

POSTED BY: Ian Williams
3 Replies

Hi Jason,

The PacletDirectoryLoad function seems to work well. Thanks again.

Ian

POSTED BY: Ian Williams

I would not recommend calling

$UserBasePacletsDirectory = "..."

since I think that would cause breakage.

From the documentation it looks like the correct way to change the \ $UserBasePacletsDirectory is on kernel startup using the option `-pacletbase`. If you are using a standalone kernel (from the command line) you just add `-pacletbase /path/to/dir` and in that kernel session it will be `$UserBasePacletsDirectory` is set equal to that variable.

If you are using a notebook front end, then you would need to go to the menu Evaluation->Kernel Configuration Options and add this option to the kernel launch command.

Personally I don't do that, I leave that variable on the factory setting and add this line to my kernel init.m file: PacletDirectoryLoad["/path/to/dir"] which ensures that any paclet residing in that directory is available to me.

POSTED BY: Jason Biggs

Thanks Jason,

The PacletDirectoryLoad function look to do exactly what I want. I hadn't noticed it in the documentation. I'll give it a try tomorrow.

Very much appreciated,

Ian

POSTED BY: Ian Williams
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