Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

here is how I solved this problem and icing on the cake it solved the problem of windows shortcuts which no longer allowed to launch firefox when leaving Ubuntu22.04 and returning to Ubuntu20.04

# I must precise that before that I first uninstall ubuntu with settings --> apps ->installed apps -> ubuntu
# but it could be not neccessary

# in PowerShell cmd :
wsl --unregister ubuntu
wsl --list --online
wsl --install -d Ubuntu-20.04
sudo apt update
sudo apt upgrade

search Ubuntu in apps and launch it

#in ubuntu cmd

sudo apt update
sudo apt upgrade

sudo apt-get install  bc binutils bzip2 ca-certificates cliquer cmake curl ecl eclib-tools fflas-ffpack flintqs g++ gcc gengetopt gfan gfortran glpk-utils gmp-ecm lcalc libatomic-ops-dev libboost-dev libbraiding-dev libbrial-dev libbrial-groebner-dev libbz2-dev libcdd-dev libcdd-tools libcliquer-dev libcurl4-openssl-dev libec-dev libecm-dev libffi-dev libflint-arb-dev libflint-dev libfplll-dev libfreetype6-dev libgc-dev libgd-dev libgf2x-dev libgiac-dev libgivaro-dev libglpk-dev libgmp-dev libgsl-dev libhomfly-dev libiml-dev liblfunction-dev liblinbox-dev liblrcalc-dev liblzma-dev libm4ri-dev libm4rie-dev libmpc-dev libmpfi-dev libmpfr-dev libncurses5-dev libntl-dev libopenblas-dev libpari-dev libpcre3-dev libplanarity-dev libppl-dev libprimesieve-dev libpython3-dev libqhull-dev libreadline-dev librw-dev libsingular4-dev libsqlite3-dev libssl-dev libsuitesparse-dev libsymmetrica2-dev libz-dev libzmq3-dev libzn-poly-dev m4 make nauty ninja-build openssl palp pari-doc pari-elldata pari-galdata pari-galpol pari-gp2c pari-seadata patch perl pkg-config planarity ppl-dev python3 python3-distutils python3-venv r-base-dev r-cran-lattice singular singular-doc sqlite3 sympow tachyon tar tox xcas xz-utils
# pb with ssh, this line does not work but it is not important! 
sudo apt-get install  autoconf automake git gpgconf libtool openssh openssh-client pkg-config
wget http://www.mirrorservice.org/sites/www.sagemath.org/src/sage-9.7.tar.gz
tar xvf sage-9.7.tar.gz
cd sage-9.7
./configure
make -j32 # 16 cores so -j32 twice the cores #

cd ~

#edit sage_nb.sh
nano sage_nb.sh
#put theses 3 lines below in it (replace ortollj by your linux user name):

#!/bin/bash
cd '/mnt/c/Documents and Settings/user/Mes documents/IPYNBpc'
/home/ortollj/sage-9.7/sage --notebook jupyter

# make it executable
chmod ug+x sage_nb.sh

# Below is where your ubuntu2004.exe  is located, User is your Windows User name
#( for me ubuntu2004.exe but it could be ubuntu.exe , please check the location)
#C:\Users\User\AppData\Local\Microsoft\WindowsApps

Create windows shortcut

This is a final nicety that lets you start the JupyterLab 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\ubuntu2004.exe run ~/sage_nb.sh
        Change Start in to: %USERPROFILE%
        Change Run to: Minimised
        Change the icon if you want – there are plenty of pieces of software that can create a .ico icon file one from an image file.
    Now hit the start button or key and type the name you gave it. it should appear in the list, and should load the server and fire up your browser when you click on it.

here is how I solved this problem and icing on the cake it solved the problem of windows shortcuts which no longer allowed to launch firefox when firefox. with leaving Ubuntu22.04 and returning to Ubuntu20.04Ubuntu20.04 !

# I must precise that before that I first uninstall ubuntu with settings --> apps ->installed apps -> ubuntu
# but it could be not neccessary

# in PowerShell cmd :
wsl --unregister ubuntu
wsl --list --online
wsl --install -d Ubuntu-20.04
sudo apt update
sudo apt upgrade

search Ubuntu in apps and launch it

#in ubuntu cmd

sudo apt update
sudo apt upgrade

sudo apt-get install  bc binutils bzip2 ca-certificates cliquer cmake curl ecl eclib-tools fflas-ffpack flintqs g++ gcc gengetopt gfan gfortran glpk-utils gmp-ecm lcalc libatomic-ops-dev libboost-dev libbraiding-dev libbrial-dev libbrial-groebner-dev libbz2-dev libcdd-dev libcdd-tools libcliquer-dev libcurl4-openssl-dev libec-dev libecm-dev libffi-dev libflint-arb-dev libflint-dev libfplll-dev libfreetype6-dev libgc-dev libgd-dev libgf2x-dev libgiac-dev libgivaro-dev libglpk-dev libgmp-dev libgsl-dev libhomfly-dev libiml-dev liblfunction-dev liblinbox-dev liblrcalc-dev liblzma-dev libm4ri-dev libm4rie-dev libmpc-dev libmpfi-dev libmpfr-dev libncurses5-dev libntl-dev libopenblas-dev libpari-dev libpcre3-dev libplanarity-dev libppl-dev libprimesieve-dev libpython3-dev libqhull-dev libreadline-dev librw-dev libsingular4-dev libsqlite3-dev libssl-dev libsuitesparse-dev libsymmetrica2-dev libz-dev libzmq3-dev libzn-poly-dev m4 make nauty ninja-build openssl palp pari-doc pari-elldata pari-galdata pari-galpol pari-gp2c pari-seadata patch perl pkg-config planarity ppl-dev python3 python3-distutils python3-venv r-base-dev r-cran-lattice singular singular-doc sqlite3 sympow tachyon tar tox xcas xz-utils
# pb with ssh, this line does not work but it is not important! 
sudo apt-get install  autoconf automake git gpgconf libtool openssh openssh-client pkg-config
wget http://www.mirrorservice.org/sites/www.sagemath.org/src/sage-9.7.tar.gz
tar xvf sage-9.7.tar.gz
cd sage-9.7
./configure
make -j32 # 16 cores so -j32 twice the cores #

cd ~

#edit sage_nb.sh
nano sage_nb.sh
#put theses 3 lines below in it (replace ortollj by your linux user name):

#!/bin/bash
cd '/mnt/c/Documents and Settings/user/Mes documents/IPYNBpc'
/home/ortollj/sage-9.7/sage --notebook jupyter

# make it executable
chmod ug+x sage_nb.sh

# Below is where your ubuntu2004.exe  is located, User is your Windows User name
#( for me ubuntu2004.exe but it could be ubuntu.exe , please check the location)
#C:\Users\User\AppData\Local\Microsoft\WindowsApps

Create windows shortcut

This is a final nicety that lets you start the JupyterLab 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\ubuntu2004.exe run ~/sage_nb.sh
        Change Start in to: %USERPROFILE%
        Change Run to: Minimised
        Change the icon if you want – there are plenty of pieces of software that can create a .ico icon file one from an image file.
    Now hit the start button or key and type the name you gave it. it should appear in the list, and should load the server and fire up your browser when you click on it.

here is how I solved this problem and icing on the cake it solved the problem of windows SageMath shortcuts which no longer allowed to launch firefox. with leaving Ubuntu22.04 and returning to Ubuntu20.04 !

# I must precise that before that I first uninstall ubuntu with settings --> apps ->installed apps -> ubuntu
# but it could be not neccessary

# in PowerShell cmd :
wsl --unregister ubuntu
wsl --list --online
wsl --install -d Ubuntu-20.04
sudo apt update
sudo apt upgrade

search Ubuntu in apps and launch it

#in ubuntu cmd

sudo apt update
sudo apt upgrade

sudo apt-get install  bc binutils bzip2 ca-certificates cliquer cmake curl ecl eclib-tools fflas-ffpack flintqs g++ gcc gengetopt gfan gfortran glpk-utils gmp-ecm lcalc libatomic-ops-dev libboost-dev libbraiding-dev libbrial-dev libbrial-groebner-dev libbz2-dev libcdd-dev libcdd-tools libcliquer-dev libcurl4-openssl-dev libec-dev libecm-dev libffi-dev libflint-arb-dev libflint-dev libfplll-dev libfreetype6-dev libgc-dev libgd-dev libgf2x-dev libgiac-dev libgivaro-dev libglpk-dev libgmp-dev libgsl-dev libhomfly-dev libiml-dev liblfunction-dev liblinbox-dev liblrcalc-dev liblzma-dev libm4ri-dev libm4rie-dev libmpc-dev libmpfi-dev libmpfr-dev libncurses5-dev libntl-dev libopenblas-dev libpari-dev libpcre3-dev libplanarity-dev libppl-dev libprimesieve-dev libpython3-dev libqhull-dev libreadline-dev librw-dev libsingular4-dev libsqlite3-dev libssl-dev libsuitesparse-dev libsymmetrica2-dev libz-dev libzmq3-dev libzn-poly-dev m4 make nauty ninja-build openssl palp pari-doc pari-elldata pari-galdata pari-galpol pari-gp2c pari-seadata patch perl pkg-config planarity ppl-dev python3 python3-distutils python3-venv r-base-dev r-cran-lattice singular singular-doc sqlite3 sympow tachyon tar tox xcas xz-utils
# pb with ssh, this line does not work but it is not important! 
sudo apt-get install  autoconf automake git gpgconf libtool openssh openssh-client pkg-config
wget http://www.mirrorservice.org/sites/www.sagemath.org/src/sage-9.7.tar.gz
tar xvf sage-9.7.tar.gz
cd sage-9.7
./configure
make -j32 # 16 cores so -j32 twice the cores #

cd ~

#edit sage_nb.sh
nano sage_nb.sh
#put theses 3 lines below in it (replace ortollj by your linux user name):

#!/bin/bash
cd '/mnt/c/Documents and Settings/user/Mes documents/IPYNBpc'
/home/ortollj/sage-9.7/sage --notebook jupyter

# make it executable
chmod ug+x sage_nb.sh

# Below is where your ubuntu2004.exe  is located, User is your Windows User name
#( for me ubuntu2004.exe but it could be ubuntu.exe , please check the location)
#C:\Users\User\AppData\Local\Microsoft\WindowsApps

Create windows shortcut

This is a final nicety that lets you start the JupyterLab 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\ubuntu2004.exe run ~/sage_nb.sh
        Change Start in to: %USERPROFILE%
        Change Run to: Minimised
        Change the icon if you want – there are plenty of pieces of software that can create a .ico icon file one from an image file.
    Now hit the start button or key and type the name you gave it. it should appear in the list, and should load the server and fire up your browser when you click on it.

here is how I solved this problem and icing on the cake it solved the problem of windows SageMath shortcuts which no longer allowed to launch firefox. with leaving Ubuntu22.04 and returning to Ubuntu20.04 !

# I must precise that before that I first uninstall ubuntu with settings --> apps ->installed apps -> ubuntu
# but it could be not neccessary

# in PowerShell cmd :
wsl --unregister ubuntu
wsl --list --online
wsl --install -d Ubuntu-20.04
sudo apt update
sudo apt upgrade

search Ubuntu in apps and launch it

#in ubuntu cmd

sudo apt update
sudo apt upgrade

sudo apt-get install  bc binutils bzip2 ca-certificates cliquer cmake curl ecl eclib-tools fflas-ffpack flintqs g++ gcc gengetopt gfan gfortran glpk-utils gmp-ecm lcalc libatomic-ops-dev libboost-dev libbraiding-dev libbrial-dev libbrial-groebner-dev libbz2-dev libcdd-dev libcdd-tools libcliquer-dev libcurl4-openssl-dev libec-dev libecm-dev libffi-dev libflint-arb-dev libflint-dev libfplll-dev libfreetype6-dev libgc-dev libgd-dev libgf2x-dev libgiac-dev libgivaro-dev libglpk-dev libgmp-dev libgsl-dev libhomfly-dev libiml-dev liblfunction-dev liblinbox-dev liblrcalc-dev liblzma-dev libm4ri-dev libm4rie-dev libmpc-dev libmpfi-dev libmpfr-dev libncurses5-dev libntl-dev libopenblas-dev libpari-dev libpcre3-dev libplanarity-dev libppl-dev libprimesieve-dev libpython3-dev libqhull-dev libreadline-dev librw-dev libsingular4-dev libsqlite3-dev libssl-dev libsuitesparse-dev libsymmetrica2-dev libz-dev libzmq3-dev libzn-poly-dev m4 make nauty ninja-build openssl palp pari-doc pari-elldata pari-galdata pari-galpol pari-gp2c pari-seadata patch perl pkg-config planarity ppl-dev python3 python3-distutils python3-venv r-base-dev r-cran-lattice singular singular-doc sqlite3 sympow tachyon tar tox xcas xz-utils
# pb with ssh, this line does not work but it is not important! 
sudo apt-get install  autoconf automake git gpgconf libtool openssh openssh-client pkg-config
wget http://www.mirrorservice.org/sites/www.sagemath.org/src/sage-9.7.tar.gz
tar xvf sage-9.7.tar.gz
cd sage-9.7
./configure
make -j32 # 16 cores so -j32 twice the cores #

cd ~

#edit sage_nb.sh
nano sage_nb.sh
#put theses 3 lines below in it (replace ortollj by your linux user name):

#!/bin/bash
cd '/mnt/c/Documents and Settings/user/Mes documents/IPYNBpc'
/home/ortollj/sage-9.7/sage --notebook jupyter

# make it executable
chmod ug+x sage_nb.sh

# Below is where your ubuntu2004.exe  is located, User is your Windows User name
#( for me ubuntu2004.exe but it could be ubuntu.exe , please check the location)
#C:\Users\User\AppData\Local\Microsoft\WindowsApps

Create windows shortcut

This is a final nicety that lets you start the JupyterLab 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\ubuntu2004.exe run ~/sage_nb.sh
        Change Start in to: %USERPROFILE%
        Change Run to: Minimised
        Change the icon if you want – there are plenty of pieces of software that can create a .ico icon file one from an image file.
    Now hit the start button or key and type the name you gave it. it should appear in the list, and should load the server and fire up your browser when you click on it.

image description