I. Disclaimer
- This script is a copied of
https://gist.github.com/tdcosta100/7def60bccc8ae32cf9cacb41064b1c0fbut "converted" for Kali inside WSL - Set DPI inside WSL doesn't work (command
xfconf-query -c xsettings -p /Gdk/WindowScalingFactor -n -t int -s 2works but it creates a glitch that windows manager won't run). To increate DPI, user can change WSL settings (however, the quality of text in WSL will be really bad) (checkhttps://github.com/microsoft/wslg/issues/590)
Save this file C:/users/username/.wslgconfig, then wsl --shutdown. File's contents:
[system-distro-env]
WESTON_RDP_HI_DPI_SCALING=true
WESTON_RDP_FRACTIONAL_HI_DPI_SCALING=true
WESTON_RDP_DEBUG_DESKTOP_SCALING_FACTOR=150
II. Installation
- Install XFCE4 and dconf-cli (dconf's database is required, kali-menu will allows X11 to find shortcuts / launchers)
sudo apt install xfce4 dconf-cli kali-menu xfce4-terminal - Generate dconf
sudo mkdir -p /etc/dconf/db/local.dthensudo dconf update(make surels /etc/dconf/db/local -lahshows a file (not empty file) - Removed lightlocker because it cause session error in message
sudo apt purge light-locker -y - (MAYBE need to mask lightdm service first)
sudo systemctl mask lightdm.service
III. Running
- First, shutdown wsl
wsl --shutdown - Start this command
DESKTOP_SESSION=lightdm-xsession \
GDMSESSION=lightdm-xsession \
XDG_CURRENT_DESKTOP=XFCE \
XDG_SESSION_TYPE=x11 \
GDK_BACKEND=x11 \
LIBGL_ALWAYS_SOFTWARE=1 \
startxfce4
(Can replace startxfce4 by xfce4-panel to have only panels from XFCE)
What worked:
- XFCE4 panels and windows manager
What didn't work / error:
- XFCE4 and Windows Manager are running in 2 different processes
- Scale doesn't work so small monitor might have trouble
- XFCE shows popup of wayland compositor error. Compositor doesn't work (neither does xfce4 tweak manager)