Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi Magma5558

first install WSL2 https://docs.microsoft.com/en-us/windows/wsl/install then in the Linux window:

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++ g++ gcc 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 libfreetype6-dev libgc-dev libgd-dev libgf2x-dev libgiac-dev libgivaro-dev libglpk-dev libgmp-dev libgsl-dev libhomfly-dev libiml-dev liblfunction-dev liblrcalc-dev liblzma-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 openssl palp pari-doc pari-elldata pari-galdata pari-galpol pari-gp2c pari-seadata patch perl pkg-config planarity ppl-dev python3 python3 python3-distutils r-base-dev r-cran-lattice singular sqlite3 sympow tachyon tar tox xcas xz-utils xz-utils

cd ~
wget http://www.mirrorservice.org/sites/www.sagemath.org/src/sage-9.5.tar.gz
tar xvf sage-9.5.tar.gz

cd sage-9.5
./configure

make
nano ~/.bashrc # add this line below at the end of bashrc
alias sage=~/sage-9.5/sage

Close ubuntu then reopen it.

edit sage_nb.sh 
nano ~/sage_nb.sh

put these 3 lines into it:

#!/bin/bash
cd /mnt/c/Documents\ and\ Settings/UserW10
/home/UserLinux/sage-9.5/sage --notebook

chmod ug+x sage_nb.sh

./sage_nb.sh

Create windows shortcut

    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\UserW10\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 – there are plenty of pieces of software that can create a .ico icon file one from an image file.

# UserW10= Users name,UserLinux = Linux Users name :
# where ubuntu.exe is located (for me Ubuntu2004.exe not ubuntu.exe!):
C:\Users\UserW10\AppData\Local\Microsoft\WindowsApps