Loading repository data…
Loading repository data…
SagarBiswas-MultiHAT / repository
Beginner-friendly, notebook-style guide to installing WSL2, Kali Linux, and Win-KeX GUI on Windows. Covers prerequisites, GPU support, command walkthroughs, installer prompt decisions, and real-world error recovery for a stable Kali-on-WSL setup.
This notebook-style guide walks you through installing WSL2, Kali Linux, and Win-KeX (Kali GUI) on Windows, including recommended prompt answers and common fixes.
How to check

If it’s disabled, enable virtualization in your BIOS/UEFI settings.
If you have NVIDIA, the recommended option is Studio Driver:
Check current driver date

Open:
Enable:

Open PowerShell (Admin) and run:
wsl --update
wsl --version
Check WSL status:
wsl
If no distro is installed yet, it will tell you no distro exists.
List available WSL distros:
wsl.exe --list --online
Install Kali:
wsl --install -d kali-linux
Set default distro:
wsl --setdefault kali-linux
Start Kali using either command:
wsl
or:
bash
Inside the Kali WSL terminal, run:
sudo apt update
apt update errors (if needed)If sudo apt update shows mirror/network errors:
sudo nano /etc/apt/sources.list
deb https://ftp.halifax.rwth-aachen.de/kali kali-rolling main contrib non-free non-free-firmware
Then run:
sudo apt update
Inside Kali:
sudo apt install kali-win-kex
Start KeX:
kex --win
Answer: n
Why n is correct:
y = view-only (cannot click or type)n = full control (keyboard + mouse)For pentesting/labs/tools, you need full control.
What happens next:
Recommended lighter daily usage (optional):
kex --sl
If you encounter errors when using Win‑KeX or related tools, review the specific cases below for common causes and step-by-step recovery instructions. Follow the checklist in each subsection before reporting bugs or seeking help.
What this error really means
Win-KeX (via TigerVNC Viewer) may show:

This message can be either normal behavior or a real KeX failure. The key is when it happens.
This is expected if you:
sudo poweroff)kex --stop)wsl --shutdown)What’s happening
Correct action
Do NOT
This is the critical case. Typical symptoms:
Common causes:
Recovery checklist (ONLY for Case B)
Run these in order from a fresh Kali shell:
kex --stop
pkill Xtigervnc
pkill kex
rm -rf ~/.vnc
rm -rf ~/.config/kex
kex --passwd
Viewonly password (y/n)? answer: nkex --win --force
Important rule (do NOT skip)
If 10053 is happening during a real crash, don’t click “Reconnect” in TigerVNC. Close the viewer and restart KeX cleanly after completing the checklist.
Quick decision table
| Situation | What to do |
|---|---|
10053 after shutdown / kex --stop | Click No, close TigerVNC (normal) |
| 10053 during KeX startup | Click YES (once), Run the recovery checklist above |
| 10061 (connection refused) | Click No, Restart KeX and/or run wsl --shutdown, then try again |
| GUI opens normally | Ignore past errors |

The “Wayland compositor does not support required protocol wlr-layer-shell” notice is purely cosmetic. It appears because the Xfce notification daemon briefly probes Wayland protocols while the rest of KeX runs on X11. The session keeps working despite the message, but you can silence it.
Optional: permanently suppress the popup
mkdir -p ~/.config/autostartcp /etc/xdg/autostart/xfce4-notifyd.desktop ~/.config/autostart/nano ~/.config/autostart/xfce4-notifyd.desktop and change (or add) Hidden=false → Hidden=true.kex --stop followed by kex --win.Once those lines are updated, the notification daemon will stay quiet for good.
kex --status # check running status
kex --stop # stop KeX
kex --win # full desktop
kex --sl # seamless mode
Stop KeX:
kex --stop
In the KeX Linux terminal (or Kali terminal), run:
sudo apt install kali-linux-large
Choose: Yes

Why Yes is correct:
Choose: Yes

Why Yes is right:
sudoWhat happens:
wiresharkdumpcap (minimal privileged component)IMPORTANT after installation (don’t skip)
Check group membership:
groups
If you see wireshark:
If you do NOT see wireshark, run:
sudo usermod -aG wireshark $USER
Then restart WSL:
wsl --shutdown
Verify again (reopen Kali):
groups
You should see:
wiresharksslh: select inetd or standalone?Select: standalone

Why standalone:
Rule of thumb:
kex --stop
Effect:
Inside Kali:
exit
(or logout)
Effect:
PowerShell:
wsl --terminate kali-linux
Shorthand:
wsl -t kali-linux
Effect:
PowerShell:
wsl --shutdown
Effect:
kex not found + dpkg interruptedExample:
kex --win
You may see:
Command 'kex' not found, but can be installed with: sudo apt install kali-win-kexError: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.Meaning:
apt is blocked until repaired.Run inside Kali:
sudo dpkg --configure -a
sudo apt --fix-broken install
sudo apt update
sudo apt install --reinstall kali-win-kex
kex --win
Note: