Ask Your Question
0

Sagemath 8.3 for W10 setting working directory for notebook

asked 2018-08-27 16:33:27 +0100

ortollj gravatar image

Hi I wrote a comment in a post already open here: running-sagemath-82-natively-in-windows-how-to-change-the-jupyter-default-directory but as I'm not sure that my comment is read, I re-open a new post:

for the purpose of working in my "C:\Users\jean-pierre\Documents\SageMath\IPYNB directory" I put this line below in the file C:\Program Files\SageMath 8.3\runtime\etc\fstab.d

REM (initial) 8.3 C:\Users\jean-pierre /home/sage ntfs binary,posix=1,usr,acl 0 0
REM (initial) Old 8.2 C:\Users /home ntfs binary,posix=1,acl 0 0
C:\Users\jean-pierre\Documents\SageMath\IPYNB  /home/jean-pierre ntfs binary,posix=1,acl 0 0

but unfortunately that does not work as in fstab for 8.2, moreover the file fstab has been renamed fstab.d in 8.3. and the command executed from within the Sage Shell : sage-sethome "C:\Users\jean-pierre\Documents\SageMath\IPYNB" does not work too, despite I got the message :

Note: SAGE_ROOT=/opt/sagemath-8.3 (sage-sh) jean-pierre@ToshibaJPO:~$ sage-sethome "C:\Users\jean-pierre\Documents \SageMath\IPYNB" Sage home directory set to 'C:\Users\jean-pierre\Documents\SageMath\IPYNB' Close and restart all Sage sessions for the new setting to take effect.

I do not like to have the default working directory here :C:\Program Files\SageMath 8.3\runtime\home\sage

edit retag flag offensive close merge delete

Comments

I precise that I have executed SageMath-8.3.exe as Administrator. I restart the installation without admin right to see if it's better. I will tell you if it is not the same.

but I have a question, why there is a space between \Documents and \SageMath\IPYNB in the message I got, while my command did not include this space ?.

ortollj gravatar imageortollj ( 2018-08-27 21:40:48 +0100 )edit

no, I have the same behavior when the installation is done without administrator rights.

ortollj gravatar imageortollj ( 2018-08-27 23:23:49 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-09-04 18:05:32 +0100

Iguananaut gravatar image

updated 2018-09-04 18:06:14 +0100

I already replied to your original comment, but again, short version:

  • "I do not like to have the default working directory here" It's not supposed to be there. There is a bug in the current version of the sage-sethome script; that's all. I'll be uploading a new version of the installer shortly that contains the fixed version. In the meantime, the existing installer gives you the option to specify your starting directory when you first install, and that does work.

  • "moreover the file fstab has been renamed fstab.d": It has not. /etc/fstab and /etc/fstab.d are to different things (the latter is a directory, in fact). I just want to make that clear in case anyone else reading is confused. Also, normally you shouldn't have to mess with these files at all; this is what sage-sethome is supposed to do. It's unfortunate that it has a bug, and I'm sorry for that.

  • "I put this line below in the file C:\Program Files\SageMath 8.3\runtime\etc\fstab.d": It should be:

    C:\Users\jean-pierre /home/sage ntfs binary,posix=1,user,acl 0 0
    

    The only problem is that one of the options is being written as "usr" by sage-sethome, when it should be "user". It seems perhaps when I wrote the file a character got accidentally deleted or something, because it used to work correctly. The fstab files are unfortunately very finnicky and have to be exactly correct, or the mounts simply don't work (and there isn't much of a useful warning either).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-08-27 16:33:27 +0100

Seen: 2,327 times

Last updated: Sep 04 '18