Running sage with files on DropBox

i like this post (click again to cancel)
2
i dont like this post (click again to cancel)

I'm curious to know whether you can run Sage on a local machine but have your worksheets saved on DropBox. Then, I could run on my home or work computer and see the same worksheets. An answer to the question Execute notebook sessions without storing it at the server says that such functionality was being worked on in Spring 2011. What is the current status? Can it be done, or is this unwise for some security reason?

asked Jul 03 '12

calc314 gravatar image calc314
1820 3 19 51

updated Nov 24 '12

John Palmieri gravatar image John Palmieri flag of United States
2605 8 23 57
http://www.math.washingto...

2 Answers:

i like this answer (click again to cancel)
5
i dont like this answer (click again to cancel) calc314 has selected this answer as correct

I just started to do this a few days ago. I set the variable DOT_SAGENB to point to a directory in my DropBox folder, and so the Sage notebook looks in this directory for its worksheets. (I think the question you referred to dealt with the Sage notebook server running at sagenb.org, for example, not Sage running on a local machine.)

You can instead set DOT_SAGE to a directory in your DropBox folder; then Sage will look for all of its files there. (If DOT_SAGENB is not set, it defaults to DOT_SAGE, and if DOT_SAGE is not set, it defaults to $HOME/.sage.) But running Sage, and even more so, doctesting Sage, produces many temporary files in DOT_SAGE, and there is no purpose sharing those in a DropBox folder.

Edit: set the environment variable DOT_SAGENB in the file $HOME/.profile, assuming you're running bash. Add a line like

export DOT_SAGENB=~/Dropbox/sage-notebooks/

Then restart your terminal window so this file is read and executed. Then run Sage. If you want to check what Sage thinks DOT_SAGENB is set to, run this at a shell prompt:

sage -sh -c 'echo $DOT_SAGENB'
link

posted Jul 03 '12

John Palmieri gravatar image John Palmieri flag of United States
2605 8 23 57
http://www.math.washingto...

updated Jul 03 '12

Is there a settings file in which I should do this so that Sage starts up this way each time? Which file would that be and where? Thank you for the help!

calc314 (Jul 03 '12)

To be honest, things are not running completely smoothly: I get occasional error messages in the console. I can't pinpoint where the problems are, but be warned...

John Palmieri (Jul 03 '12)

Thanks. I'm experimenting to see what works. So far, I've had only a few issues. But, I do wonder about how much it hits Dropbox. From a slow internet connection (i.e., home), this might not work well.

calc314 (Jul 03 '12)

Just an update on my brief experience with this experiment...

1) The errors that I'm currently getting are all due to being on a computer that doesn't have something installed that is installed at sagenb.org. For example, I have a laptop without gcc and a worksheet that calls gcc to compile something.

2) The file I had to do the above environment variable setting in was $home/.bash_profile. This is on a Mac running OS 10.6.8.

calc314 (Jul 05 '12)
i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

I've now upgraded to Mac OS 10.8.2 (Mountain Lion) and am having some trouble getting Sage to read the dropbox files. I could use some advice.

I can get the notebook to open and run by using the following command at a sage prompt:

notebook(interface='localhost', directory='./sage_notebook.sagenb',port=8000)

Based on some experimenting, Sage isn't finding the dropbox directory when I try entering other things for the directory.

Any thoughts?

link

posted Oct 08 '12

calc314 gravatar image calc314
1820 3 19 51

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

2 followers

Tags:

Stats:

Asked: Jul 03 '12

Seen: 318 times

Last updated: Oct 08 '12

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.