ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 19 Apr 2014 12:44:07 -0500Running sage with files on DropBoxhttps://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/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](http://ask.sagemath.org/question/317/execute-notebook-sessions-without-storing-it-at) 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?Tue, 03 Jul 2012 07:51:51 -0500https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/Answer by John Palmieri for <p>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 <a href="http://ask.sagemath.org/question/317/execute-notebook-sessions-without-storing-it-at">Execute notebook sessions without storing it at the server</a> 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?</p>
https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?answer=13790#post-id-13790I 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'
Tue, 03 Jul 2012 10:23:04 -0500https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?answer=13790#post-id-13790Comment by calc314 for <p>I just started to do this a few days ago. I set the variable <code>DOT_SAGENB</code>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 <a href="http://sagenb.org">sagenb.org</a>, for example, not Sage running on a local machine.)</p>
<p>You can instead set <code>DOT_SAGE</code> to a directory in your DropBox folder; then Sage will look for all of its files there. (If <code>DOT_SAGENB</code> is not set, it defaults to <code>DOT_SAGE</code>, and if <code>DOT_SAGE</code> is not set, it defaults to <code>$HOME/.sage</code>.) But running Sage, and even more so, doctesting Sage, produces many temporary files in <code>DOT_SAGE</code>, and there is no purpose sharing those in a DropBox folder.</p>
<p>Edit: set the environment variable <code>DOT_SAGENB</code> in the file <code>$HOME/.profile</code>, assuming you're running bash. Add a line like</p>
<pre><code>export DOT_SAGENB=~/Dropbox/sage-notebooks/
</code></pre>
<p>Then restart your terminal window so this file is read and executed. Then run Sage. If you want to check what Sage thinks <code>DOT_SAGENB</code> is set to, run this at a shell prompt:</p>
<pre><code>sage -sh -c 'echo $DOT_SAGENB'
</code></pre>
https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?comment=19442#post-id-19442Just 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.Thu, 05 Jul 2012 07:36:12 -0500https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?comment=19442#post-id-19442Comment by John Palmieri for <p>I just started to do this a few days ago. I set the variable <code>DOT_SAGENB</code>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 <a href="http://sagenb.org">sagenb.org</a>, for example, not Sage running on a local machine.)</p>
<p>You can instead set <code>DOT_SAGE</code> to a directory in your DropBox folder; then Sage will look for all of its files there. (If <code>DOT_SAGENB</code> is not set, it defaults to <code>DOT_SAGE</code>, and if <code>DOT_SAGE</code> is not set, it defaults to <code>$HOME/.sage</code>.) But running Sage, and even more so, doctesting Sage, produces many temporary files in <code>DOT_SAGE</code>, and there is no purpose sharing those in a DropBox folder.</p>
<p>Edit: set the environment variable <code>DOT_SAGENB</code> in the file <code>$HOME/.profile</code>, assuming you're running bash. Add a line like</p>
<pre><code>export DOT_SAGENB=~/Dropbox/sage-notebooks/
</code></pre>
<p>Then restart your terminal window so this file is read and executed. Then run Sage. If you want to check what Sage thinks <code>DOT_SAGENB</code> is set to, run this at a shell prompt:</p>
<pre><code>sage -sh -c 'echo $DOT_SAGENB'
</code></pre>
https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?comment=19447#post-id-19447To 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...Tue, 03 Jul 2012 15:06:51 -0500https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?comment=19447#post-id-19447Comment by calc314 for <p>I just started to do this a few days ago. I set the variable <code>DOT_SAGENB</code>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 <a href="http://sagenb.org">sagenb.org</a>, for example, not Sage running on a local machine.)</p>
<p>You can instead set <code>DOT_SAGE</code> to a directory in your DropBox folder; then Sage will look for all of its files there. (If <code>DOT_SAGENB</code> is not set, it defaults to <code>DOT_SAGE</code>, and if <code>DOT_SAGE</code> is not set, it defaults to <code>$HOME/.sage</code>.) But running Sage, and even more so, doctesting Sage, produces many temporary files in <code>DOT_SAGE</code>, and there is no purpose sharing those in a DropBox folder.</p>
<p>Edit: set the environment variable <code>DOT_SAGENB</code> in the file <code>$HOME/.profile</code>, assuming you're running bash. Add a line like</p>
<pre><code>export DOT_SAGENB=~/Dropbox/sage-notebooks/
</code></pre>
<p>Then restart your terminal window so this file is read and executed. Then run Sage. If you want to check what Sage thinks <code>DOT_SAGENB</code> is set to, run this at a shell prompt:</p>
<pre><code>sage -sh -c 'echo $DOT_SAGENB'
</code></pre>
https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?comment=19448#post-id-19448Is 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!Tue, 03 Jul 2012 13:43:51 -0500https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?comment=19448#post-id-19448Comment by calc314 for <p>I just started to do this a few days ago. I set the variable <code>DOT_SAGENB</code>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 <a href="http://sagenb.org">sagenb.org</a>, for example, not Sage running on a local machine.)</p>
<p>You can instead set <code>DOT_SAGE</code> to a directory in your DropBox folder; then Sage will look for all of its files there. (If <code>DOT_SAGENB</code> is not set, it defaults to <code>DOT_SAGE</code>, and if <code>DOT_SAGE</code> is not set, it defaults to <code>$HOME/.sage</code>.) But running Sage, and even more so, doctesting Sage, produces many temporary files in <code>DOT_SAGE</code>, and there is no purpose sharing those in a DropBox folder.</p>
<p>Edit: set the environment variable <code>DOT_SAGENB</code> in the file <code>$HOME/.profile</code>, assuming you're running bash. Add a line like</p>
<pre><code>export DOT_SAGENB=~/Dropbox/sage-notebooks/
</code></pre>
<p>Then restart your terminal window so this file is read and executed. Then run Sage. If you want to check what Sage thinks <code>DOT_SAGENB</code> is set to, run this at a shell prompt:</p>
<pre><code>sage -sh -c 'echo $DOT_SAGENB'
</code></pre>
https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?comment=19446#post-id-19446Thanks. 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.Tue, 03 Jul 2012 16:37:52 -0500https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?comment=19446#post-id-19446Answer by calc314 for <p>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 <a href="http://ask.sagemath.org/question/317/execute-notebook-sessions-without-storing-it-at">Execute notebook sessions without storing it at the server</a> 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?</p>
https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?answer=14123#post-id-14123I'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?
Mon, 08 Oct 2012 15:15:39 -0500https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?answer=14123#post-id-14123Answer by k1 for <p>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 <a href="http://ask.sagemath.org/question/317/execute-notebook-sessions-without-storing-it-at">Execute notebook sessions without storing it at the server</a> 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?</p>
https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?answer=16102#post-id-16102This is what I did:
sage -n '~/Dropbox/Sage'
It creates a folder called `Sage.sagenb` and it works like your local sagenb folder in Sage installation folder. Then it asks for admin password if it's the first time you're running it in that folder.Sat, 19 Apr 2014 12:44:07 -0500https://ask.sagemath.org/question/9126/running-sage-with-files-on-dropbox/?answer=16102#post-id-16102