WSL2 and desktop shortcut
Hi
Since I had upgraded my Ubuntu Version to Ubuntu 22.04 my desktop shortcut to launch SageMath through WSL2 no longer works.a WSL Ubuntu is launched but firefox does not open a tab (I have to copy past the local url with the tocken given in WSL shell in a W11 browser) , but ./sage_nb.sh is working well if I execute it directly in WSL shell then a browser (here firefox) tab is opening in W11.
Even if I execute in cmd W11 shell :ubuntu.exe run ~/sage_nb.sh no browser tab is opening.
my sage_nb.sh content :
ortollj@DESKTOP-K30FLRP:~$ more sage_nb.sh#!/bin/bashcd '/mnt/c/Documents and Settings/user/Mes documents/IPYNBpc'/home/sage-9.7.rc1/sage --notebook jupyter#SAGE_ROOT/sage --notebookortollj@DESKTOP-K30FLRP:~$
this is below how my desktop shortcut is configured:
Create windows shortcut
This is a final nicety that lets you start the Jupyter notebook server in one click:
Open Windows explorer, and type %APPDATA%\Microsoft\Windows\Start Menu\Programs
Make a copy of any of the program icons – we’ll customise it to do what we want
Right-click, and choose properties.
On the General tab:
Change the name to whatever you want.
On the Shortcut tab:
Change Target to: C:\Users\User\AppData\Local\Microsoft\WindowsApps\ubuntu.exe run ~/sage_nb.sh
Change Start in to: %USERPROFILE%
Change Run to: Minimised
Change the icon if you want .
I wonder if this is not due to the error message appearing at the top of my WSL window since the upgrade:scrollback: command not found
which would prevent W11 to continue ?
see for more details:question on askSage.org
I tried also with :export BROWSER='/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe'
same behavior shortcut does not work but ./sage_nb.sh is working well if I execute it directly in WSL shell then a browser (here Edge) tab is opening in W11.
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:~$