Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to make ubuntu launch jupyter(sage) in windows browser?

I installed sagemath in WSL from source. I followed the steps mentioned in Installation guide and I also made a script file to start Jupyter notebook kernel from Ubuntu as explained in Launching SageMath page of Sage installation guide. The code to be entered in the script is

#!/bin/bash

cd /mnt/c/path/to/desired/starting/directory

SAGE_ROOT/sage --notebook

I modified it a little to make it open the notebook in my Windows browser in the following way,

#!/bin/bash

cd /mnt/c/Users/starting/directory

SAGE_ROOT/sage --notebook --ip=0.0.0.0 --port=8888 --no-browser &

sleep 2

cmd.exe /C start "http:// $ (hostname -I | awk '{print $1}'):8888"

This modification to my script opens the notebook in my default Windows browser, but it keeps asking me for a token login. I added a password to my jupyter notebook so that I don't need to enter tokens but it still doesn't fix the issue.

How do I make this work? Please help. Thanks in advance.

click to hide/show revision 2
retagged

How to make ubuntu launch jupyter(sage) in windows browser?

I installed sagemath in WSL from source. I followed the steps mentioned in Installation guide and I also made a script file to start Jupyter notebook kernel from Ubuntu as explained in Launching SageMath page of Sage installation guide. The code to be entered in the script is

#!/bin/bash

cd /mnt/c/path/to/desired/starting/directory

SAGE_ROOT/sage --notebook

I modified it a little to make it open the notebook in my Windows browser in the following way,

#!/bin/bash

cd /mnt/c/Users/starting/directory

SAGE_ROOT/sage --notebook --ip=0.0.0.0 --port=8888 --no-browser &

sleep 2

cmd.exe /C start "http:// $ (hostname -I | awk '{print $1}'):8888"

This modification to my script opens the notebook in my default Windows browser, but it keeps asking me for a token login. I added a password to my jupyter notebook so that I don't need to enter tokens but it still doesn't fix the issue.

How do I make this work? Please help. Thanks in advance.