This is a list of step-by-step instructions to set up a WSL2 environment from scratch to build, run, and develop the TypeAgent repo, collated from various READMEs throughout the repo and external source. The instruction will install and setup the necessary tools and put the repo in ~/src/TypeAgent
. Links to the original instructions for each part are provided for reference, but mostly not required to visit if you just follow the instructions here. Skip or change the steps as necessary to suit your needs.
- Initialize Ubuntu distro
- Start Windows command prompt
wsl --install Ubuntu
- Setup WSL Username/password
- Setup node
- Setup NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
- Install Node
nvm install --lts
- Setup NVM
- Clone and build:
git clone https://github.com/microsoft/TypeAgent ~/src/TypeAgent
cd ~/src/TypeAgent/ts
pnpm setup
pnpm i
pnpm run build
- Setup for electron
sudo apt update
sudo apt-get install -y build-essential clang libdbus-1-dev libgtk-3-dev libnotify-dev libasound2-dev libcap-dev libcups2-dev libxtst-dev libxss1 libnss3-dev gcc-multilib g++-multilib curl gperf bison python3-dbusmock openjdk-8-jre
- Setup WSL2 to use Windows font
echo '<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd"><fontconfig><dir>/mnt/c/Windows/Fonts</dir></fontconfig>' > local.conf
sudo mv local.conf /etc/fonts
- Add config to
.bashrc
- Ensure keyring UI display:
echo 'dbus-update-activation-environment --all > /dev/null 2>&1' >> ~/.bashrc
- UI cursor size
echo 'export XCURSOR_SIZE=16' >> ~/.bashrc
- Warning
echo 'export GALLIUM_DRIVER=d3d12' >> ~/.bashrc
- Ensure keyring UI display:
- Setup GNOME keyring
sudo apt-get install -y gnome-keyring
- Restart WSL
exit
wsl --shutdown
wsl -d Ubuntu
cd ~/src/TypeAgent/ts
- Setup Service Keys (See instructions here)
- Run the TypeAgent shell
pnpm run shell
- Dialog will popup to setup up password for the keyring
- Install VSCode on Windows (download)
- Install VSCode extension Remote Development
- Start VSCode in WSL (Continued from above command prompt in WSL)
code ~/src/TypeAgent/ts