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

asked 2024-02-13 08:53:53 +0200

AKGSage gravatar image

updated 2024-02-13 11:42:27 +0200

FrédéricC gravatar image

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


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,


cd /mnt/c/Users/starting/directory

SAGE_ROOT/sage --notebook --ip= --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.

edit retag flag offensive close merge delete


look here maybe it could help ? : best-and-easy-way-to-install-sagemath-in-w11

ortollj gravatar imageortollj ( 2024-02-13 17:41:57 +0200 )edit