When I run the kex, it gives this error
Error connecting to the KeX server.
Please try "kex start" to start the service.
If the server fails to start, please try "kex kill" or restart your WSL2 session and try again.
When I run the kex, it gives this error
Error connecting to the KeX server.
Please try "kex start" to start the service.
If the server fails to start, please try "kex kill" or restart your WSL2 session and try again.
Following Instructions worked for me, remount /tmp/.X11-unix
with rw
option:
sudo mount -o remount,rw /tmp/.X11-unix
https://github.com/microsoft/WSL/issues/9303#issuecomment-1345615675
i solved the same problem
sudo apt remove -y kali-win-kex && sudo apt install -y kali-win-kex
I also was unable to bring up KEX, and found out it was do to an oversight with the WSL version
It turns out I had the KALI BOX still on WSL v1, fixing to WSL v2 fixed it for me
upgrade it first to version 2 using the following command:
wsl --set-version kali-linux 2
When upgrading the distro to WSL2, you may be prompted to download and install the latest Linux Kernel, which you should do.
You can then enter the wsl -l -v
command again to confirm that Kali Linux is now configured as a WSL2 distribution.
Now launch Kali Linux and run the following commands to prep the distribution with the latest updates and required files.
sudo apt update
sudo apt dist-upgrade
These steps solved it for me:
sudo su
(some commands require root)cd /tmp
ls -a
rm .X1-lock
, rm .X2-lock
...)rm -r /tmp/.X11-unix
vncserver
kex
Enjoy
After switching to the Windows App version of WSL with
wsl.exe --update
I also had this issue.
This fixed the issue:
sudo apt remove -y kali-win-kex && sudo apt install -y kali-win-kex
sudo apt-get update
sudo apt-get upgrade
sudo su
umount /tmp/X11-unix
rm -r /tmp/.X11-unix
rm /tmp/.X1-lock
exit
sudo rm /home/YOURUSERNAME/.Xauthority
vncserver
kex
Not all steps are necessary..
Somehow
kex --win -s
fixed the audio so I have audio now. So input that if you have problems with the audio and WSL. Windows is asking you for permission for audiopulse. Confirm and then you would have the audio..
Good luck and a good new year.
© 2022 - 2024 — McMap. All rights reserved.