Ask Your Question
0

Running Sagemath 8.2 natively in Windows, how to change the Jupyter default directory?

asked 2018-05-26 21:59:30 -0500

res0001 gravatar image

updated 2018-05-27 18:08:20 -0500

With SageMath 8.2 running natively under Windows 10, the Jupyter dashboard opens by default in the directory C:\Users\<me>, so I then have to navigate to the desired directory that contains my Jupyter notebook .ipynb files.

How can I cause Jupyter to open directly in the desired directory?

The relevant Windows shortcut has the following Target Property:

"C:\Program Files\SageMath 8.2\runtime\bin\mintty.exe" -t 'SageMath 8.2 Notebook Server' -i sagemath.ico /bin/bash --login -c '/opt/sagemath-8.2/sage --notebook jupyter'

Can the sage --notebook jupyter portion be adjusted somehow to specify the desired directory?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2018-05-27 02:41:29 -0500

danielvolinski gravatar image

Locate file fstab in SageMath_Installation\runtime\etc and add a new line at the end, like this

"D:\Users\danie_000\Sage /home/danie_000 ntfs binary,posix=1,acl 0 0" (without the quotes)

Of course you should adapt the line to your user <me> not danie_000.

From now on the Jupyter folder will be opened at D:\Usersdanie_000\Sage

Details at https://github.com/sagemath/sage-wind...

C:\Users\<Your Windows Username>\<Your preferred Sage home> /home/<Your Windows username> ntfs binary,posix=1,acl 0 0

Daniel

edit flag offensive delete link more

Comments

Thank you! That seems to be working after I changed my directory names to remove all spaces from them.

res0001 gravatar imageres0001 ( 2018-05-27 10:46:07 -0500 )edit
1

answered 2018-05-27 02:52:37 -0500

eric_g gravatar image

updated 2018-05-27 02:56:17 -0500

Another possibility could be to add the option --notebook-dir to the command sage --notebook jupyter:

sage --notebook jupyter --notebook-dir directory_name
edit flag offensive delete link more

Comments

This is along the lines I'd hoped for, but unfortunately it doesn't work. (I also tried it using an equals sign: --notebook-dir=directory_name.)

res0001 gravatar imageres0001 ( 2018-05-27 10:01:50 -0500 )edit

Too bad! (this works with Linux, but I could not tell for Windows)

eric_g gravatar imageeric_g ( 2018-05-27 14:06:45 -0500 )edit

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-05-26 21:59:30 -0500

Seen: 78 times

Last updated: May 27