Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 1.99 KB

wsl2.md

File metadata and controls

45 lines (28 loc) · 1.99 KB

WSL2 development environment setup

⚠️ 🚨 DO NOT CLONE doughnut source to a MS Windows directory (e.g. /mnt/c/)!!! Instead, in your WSL2 session, cd ~ then git clone [email protected]:nerds-odd-e/doughnut.git

1. Ensure you install WSL2g with Ubuntu-23.04 from official Microsoft Store

Follow this youtube video tutorial on how to install WSL2 with WSLg (Linux GUI enabled in WSL2) so you can run cypress in cypress:open mode. Make sure you do not run WSL2g as root user for doughnut development enviroment. nix tool setup with root user will fail!

2. Additional packages to be installed for Cypress to work

sudo apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb

For Ubuntu 24.04 use the following command:

sudo apt-get install libgtk2.0-0t64 libgtk-3-0t64 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb

Follow the instruction from this article to setup an X-Server needed to run Cypress with GUI (i.e. pnpm cy:open)

Open your start menu > right-click XLaunch shortcut > More > Open file location;

Right-click XLaunch shortcut in the Explorer window > Properties;

Add -ac option right after the closing double quote in the Target field - i.e. "C:\Program Files\VcXsrv\xlaunch.exe" -ac;

If you still failed to open cypress after following above instructions, you may try replace DISPLAY by below commands in .bashrc.

export DISPLAY=$(route.exe print | grep 0.0.0.0 | head -1 | awk '{print $4}'):0.0

3. Git checkout as-is, commit Unix-style

git config --global core.autocrlf input
git add --renormalize .

4. Git credentials

You can config wsl2 git to use windows credential manager to avoid personal access token by following this article