* New Install 03/04/2024 (In PowerShell) wsl --install -d Debian (reboot) 53 sudo apt-get update 54 sudo apt-get install xterm 55 sudo apt-get install imagemagick 56 sudo apt-get install gnuplot-x11 57 sudo apt-get install xmaxima 58 sudo apt-get install octave-signal 59 sudo apt-get install octave-jsonlab 60 sudo apt-get install x11-apps 61 sudo apt-get install x11-utils 62 sudo apt-get install xbitmaps 63 sudo apt-get install fig2dev 64 sudo apt-get install git 65 sudo apt-get install zip 66 sudo apt-get install rsync 67 sudo apt-get install vim 68 sudo apt-get install xfonts-base xfonts-utils xfonts-100dpi xfonts-75dpi sudo apt-get install x11-xfs-utils 69 sudo apt-get update 70 sudo apt-get install gcc 71 sudo apt-get install make 72 sudo apt-get install perl 73 sudo apt-get install tk 74 sudo apt-get install openssh-client 75 sudo apt-get install epstool 78 sudo apt-get update 79 sudo apt-get upgrade 46 sudo apt install python3-numpy 47 sudo apt install python3-matplotlib 48 sudo apt install python3-scipy (This method does not seem to work with PyMuPDF) * ******************************************************** * Default windows terminal for Debian quit working again created ...\Downloads\RunDebian.ps1 which simply has one line in it wsl -d Debian create a shortcut on Desktop name FastDeb Target : C:\Users\warwargr\Downloads\RunDebian.ps1 Start_In : C:\BB Shortcut_key : None Run : Normal window Right-click on this shortcut and select "Run with PowerShell" * Default windows terminal quit working Now have to open PowerShell and type : wsl -d Debian Then do cd Then do gterm ~/bin/gterm #!/bin/bash xterm -fa 'Nimbus Mono' -fs 16 -rightbar -sb -bg grey & * put his in .bash_aliases export HOST_IP=$(ip route | grep default | awk '{print $3}') export DISPLAY=$HOST_IP:0 (need to allow vcxsrv thru firewall, either as an exception, or turn firewall off) * ************************************ * /etc/resolvf.conf * ************************************ # Made by Greg nameserver 8.8.8.8 * ************************************ * ************************************ * /etc/wsl.conf * ************************************ # made by greg [network] generateResolvConf = false * ************************************ * fonts cp -r /ubox/fonts ~/.fonts fc-list (you can also add the fonts into windows by simply opening the font tool, and dragging them in) (TCM, and bahnschrift should already exist in windows) * Task Manager Details Tab Notice there is a process wsl.exe It seems that you sometimes need to provide an outgoing firewall rule to allow this app thru the fire wall Open firewall tool and create an inbound rule for this This all seems inconsistent, and perhaps dependent on your antivirus software. All of a sudden I sometimes need to mess with this, and other times I don't. I still don't fully understand this, but definitely can block internet or ssh access through wsl * In powershell, to check Windows status Get-ComputerInfo | select Windows * Control Panel --> Programs and Features : Turn Windows features on or off Notice Virtual Machine Platform Notice Windows Subsystem for Linux * To Start over (in powershell as administrator) : wsl --list --verbose wsl --unregister Debian wsl --install -d Debian * ******************************** 1. open a powershell as admin 2. wsl --list --online 3. wsl --install -d Debian (reboot) (make sure connected to internet) 4. setup wsl2 user and passwd as prompted (if not prompted then : * open a power shell as admin * wsl --list --verbose * wsl --list --online * wsl --install -d Debian 5. In the debian window that pops up add user and passwd 5. Open a powershell (if you don't already have one from step 4) * wsl --list --verbose (you should see the version you installed now) 6. Open a new debian window sudo ls sudo apt-get update sudo apt-get install vim sudo apt-get install xterm sudo apt-get install gcc make perl sudo apt-get install xfstt xfonts-base xfonts-utils xfonts-100dpi xfonts-75dpi sudo apt-get install imagemagick sudo apt-get install gnuplot-x11 sudo apt-get install python3-tk sudo apt-get install tk sudo apt-get install maxima xmaxima octave octave-signal octave-symbolic sudo apt-get install rlwrap sudo apt-get install openssh-client sudo apt-get install x11-apps x11-utils xbitmaps sudo apt-get install fig2dev epstool sudo apt-get install git 7. Create bash settings file vim .bash_aliases * 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 #!/bin/bash export UBOX=/ubox export DD=/mnt/c/Users/yourname/DD export DD_DOS="C:/Users/yourname/DD" export HOST_IP=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}') PATH=.:$HOME/bin:$UBOX/qlob/bin:$UBOX/qlob/acodir/aco/bin:$DD/bin:$PATH alias lls='ls -alrt' alias ll='ls -l' alias llm='ls -l | more' alias lct='cut -c -120' alias mypath="echo \$PATH | sed -e 's/:/\n/g'" export DISPLAY=$HOST_IP:0 * 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 8. Create .vimrc vim .vimrc set viminfo= :highlight Visual cterm=reverse ctermbg=NONE ********************* Added rlwrap rlwrap -c tclsh Windows_Update Click "Advanced options" button Enable "Receive updates for other Microsoft products when you update Windows" (go back one menu level) Click "Check for updates" (this should update the wsl2 linux core if a new one is available) I did all this and can see from uname -a That I have Linux MSI 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 GNU/Linux Sadly, I still do not seem to have access to com ports in WSL2 as I did in WSL I installed usbip ad hwdata and linux-tools I believe you also need to install the windows version of usbip-win or usbipd-win and then run some commands from a DOS cmd window to pass the ports to wsl2 This is all open source stuff on the Windows side, so I'm not installing the usbipd-win yet. Here are the references : https://docs.microsoft.com/en-us/windows/wsl/connect-usb https://github.com/dorssel/usbipd-win ************************************************* sudo apt-get install git ssh-keygen -t rsa -b 4096 -C "someone@somewhere.org" greg@MSI:~/ggit/ffox$ git add hello.c greg@MSI:~/ggit/ffox$ git commit -m gg20211221 *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for ) not allowed greg@MSI:~/ggit/ffox$ git config --global user.email "someone@somewhere.org" greg@MSI:~/ggit/ffox$ git config --global user.name "Someone ME" greg@MSI:~/ggit/ffox$ greg@MSI:~/ggit/ffox$ greg@MSI:~/ggit/ffox$ greg@MSI:~/ggit/ffox$ greg@MSI:~/ggit/ffox$ git commit -m ff20211221 1 file changed, 4 insertions(+) create mode 100644 hello.c ************************************************* greg@MSI:~$cat .bash_aliases # ***************************************************************************************** # change the brigtness code to normal 01;32m --> 00;32m and 01;34m --> 00;34m # You may need to edit LS_COLORS as well, depending on the terminal # ***************************************************************************************** # export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ " export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[00;35m\]\u@\h\[\033[00m\]:\[\033[00;34m\]\w\[\033[00m\]\$ " # ***************************************************************************************** UBOX=/ubox export UBOX export DD=/mnt/c/Users/gooyw/DD PATH=.:$HOME/bin:$UBOX/qlob/bin:$PATH alias lls='ls -lrt' alias ll='ls -l' alias llm='ls -l | more' alias mypath="echo \$PATH | sed -e 's/:/\n/g'" * ******************************** * seems we need a .vimrc in the latest version for proper highlighting set viminfo= :highlight Visual cterm=reverse ctermbg=NONE * ******************************************************** [greg@rhat73 ~]$ cat .bash_aliases #!/bin/bash UBOX=/ubox export UBOX export DD=/mnt/c/Users/gooyw/DD PATH=.:$HOME/bin:$UBOX/qlob/bin:$PATH alias lls='ls -lrt' alias ll='ls -l' alias llm='ls -l | more' alias mypath="echo \$PATH | sed -e 's/:/\n/g'" * ******************************** sudo mkdir /mnt/d sudo mount -t drvfs D: /mnt/d * ******************************** 1. open a powershell as admin 2. wsl --list --online 3. wsl --install -d Debian (reboot) (make sure connected to internet) (may have to manually reopen Debian if you get an error) 4. setup wsl2 user and passwd as prompted 5. open a powershell as admin 6. wsl --list --verbose ********************* first run : sudo apt-get update sudo apt-get install vim sudo apt-get install xterm sudo apt-get install gcc make perl sudo apt-get install xfstt xfonts-100dpi xfonts-75dpi sudo apt-get install imagemagick sudo apt-get install gnuplot-x11 sudo apt-get install python3-tk sudo apt-get install tk sudo apt-get install maxima xmaxima octave octave-signal octave-symbolic sudo apt-get install rlwrap sudo apt-get install openssh-client (you may need to adjust firewall) (allow c:/windows/system32/wsl.exe) (allow secure socket tunneling) (make sure wifi connection properties private) sudo apt-get install x11-apps x11-utils xbitmaps sudo apt-get install fig2dev epstool export DISPLAY=:0.0 xterm ./convert3.py sudo apt-get install libgtkmm-3.0-dev libgtkmm-2.4-dev cd cwork g++ -std=c++11 helloworld.cc main.cc `pkg-config gtkmm-3.0 --cflags --libs` --- maxima plot2d(sin(x), [x, 0, 8]); ********************************************** Install vcxsrv from sourceforge When you run it, allow access through firewall even on public network ********************************************** greg@BK8S5D3:~$ cat /etc/resolv.conf | grep nameserver | awk '{print $2}' 172.31.64.1 greg@BK8S5D3:~$ setenv DISPLAY :0.0 -bash: setenv: command not found greg@BK8S5D3:~$ export DISPLAY=:0.0 greg@BK8S5D3:~$ wish application-specific initialization failed: couldn't connect to display ":0.0" % greg@BK8S5D3:~$ export DISPLAY=172.31.64.1:0.0 g ********************************************** (in .bash_aliases) export HOST_IP=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}') export DISPLAY=$HOST_IP:0 You can probably autostart vcxsrv Auto start VcXsrv by WIN + R then type shell:startup Right click > new > shortcut Enter shortcut location to "C:\Program Files\VcXsrv\vcxsrv.exe" -ac -multiwindow ********************************************** * *************************************** * Potential problems with windows firewall If you are on a home wireless, click on the windows toolbar network icon change the wireless network from public to private also, may need to adjust the firewall settings * ***************************************