Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

replace ortollj by your user name

in WSL create config file :

sage jupyter notebook --generate-config

then :

nano /home/ortollj/.sage//jupyter-4.1/jupyter_notebook_config.py

and put thes line uncommented ! no #

c.NotebookApp.use_redirect_file = False
import webbrowser
webbrowser.register('firefox', None, webbrowser.GenericBrowser(u'C:\\Program Files\\Mozilla Firefox\\firefox.exe'))
export BROWSER='/mnt/c/Program Files/Mozilla Firefox/firefox.exe'
c.NotebookApp.browser = 'firefox'

you can change the web browser and its location to the one you prefer

replace ortollj by your user name

in WSL create config file :

sage jupyter notebook --generate-config

then :

nano /home/ortollj/.sage//jupyter-4.1/jupyter_notebook_config.py

and put thes line uncommented ! no #

c.NotebookApp.use_redirect_file = False
import webbrowser
webbrowser.register('firefox', None, webbrowser.GenericBrowser(u'C:\\Program Files\\Mozilla Firefox\\firefox.exe'))
export BROWSER='/mnt/c/Program Files/Mozilla Firefox/firefox.exe'
c.NotebookApp.browser = 'firefox'

you can change the web browser and its location to the one you prefer

[edited 2022/september 12 Mea Culpa ] in fact I just realized that apart from the line c.NotebookApp.use_redirect_file = False it is useless to add the rest of the code above in jupyter_notebook_config.py, it is in the ~/.bashrc file that you just have to add:

# ortollj added  see stackOverflow:
# https://stackoverflow.com/questions/62814002/start-this-command-cannot-be-run-due-to-the-error-the-system-cannot-find-the
# export BROWSER='/mnt/c/Program Files/Google/Chrome/Application/chrome.exe'
export BROWSER='/mnt/c/Program Files/Mozilla Firefox/firefox.exe'

as I had did several modifications to try to solve this problem I foolishly thought that it was my last modification in the jupyter_notebook_config.py file which would have been effective when in fact it was only my modification in the bashrc file ! sorry for that.

replace ortollj by your user name

in WSL create config file :

sage jupyter notebook --generate-config

then :

nano /home/ortollj/.sage//jupyter-4.1/jupyter_notebook_config.py

and put thes line uncommented ! no #

c.NotebookApp.use_redirect_file = False
import webbrowser
webbrowser.register('firefox', None, webbrowser.GenericBrowser(u'C:\\Program Files\\Mozilla Firefox\\firefox.exe'))
export BROWSER='/mnt/c/Program Files/Mozilla Firefox/firefox.exe'
c.NotebookApp.browser = 'firefox'

you can change the web browser and its location to the one you prefer

[edited 2022/september 12 Mea Culpa ] in fact I just realized that apart from the line c.NotebookApp.use_redirect_file = False it is useless to add the rest of the code above in jupyter_notebook_config.py, it is in the ~/.bashrc file that you just have to add:

# ortollj added  see stackOverflow:
# https://stackoverflow.com/questions/62814002/start-this-command-cannot-be-run-due-to-the-error-the-system-cannot-find-the
# export BROWSER='/mnt/c/Program Files/Google/Chrome/Application/chrome.exe'
export BROWSER='/mnt/c/Program Files/Mozilla Firefox/firefox.exe'

as I had did several modifications to try to solve this problem I foolishly thought that it was my last modification in the jupyter_notebook_config.py file which would have been effective when in fact it was only my modification in the bashrc file ! sorry for that.

[edited 2022/09/19]

I forgot to specify that I had also done before the evolution to Ubuntu 22.04 the command: wsl.exe --update. I think with hindsight that I should not have made this evolution of WSL. In addition, the command: wsl.exe --list --verbose is not at all verbose, it responds with a simple laconic message:

wsl.exe --list --verbose
   NAME    STATE    VERSION
   Ubuntu Running    2
ortollj@DESKTOP-K30FLRP:~$