0

This had never happened to me before until I started using Windows 11.

Firstly, I have already followed this guide step-by-step far before posting: https://www.kali.org/docs/wsl/win-kex/

I am a Windows Insider helping to develop winget-cli, and I have used the Beta channel for Windows 11 for the last 4 months. When the official update rolled out, I did a fresh install on my two new M.2 NVME SSDs. After doing the same installation method, KeX is not working for me.

Would you please let me know if there is anything I can do to make this work? I usually use Kali Linux 2021.3 on VMware Workstation Pro 16, but I like to use it on the Windows Terminal through KeX.

At this time, I cannot use VNCviewer or RDP. What is going on?

Below is if I try to start kex. I also have VNC Viewer, Tiger VNC, etc. Thank you.

And please let me know if any other information is needed. I know my firewall is not blocking it.

enter image description here

1

4 Answers 4

1

None of the above solutions worked for me. What did work however was to close all terminals, then kill the Windows Subsystem for Linux instances via Windows task manager and then try again.

Cause: According to https://github.com/microsoft/WSL/issues/6982 this might be a bug with VmmemWSL and hibernation though others reported issues with docker as well.

Given that the ticket is (at time of writing) already two years old with 360+ comments I don't expect this to be fixed any time soon - which is rather sad given that it is an officially promoted distribution.

0

First try the tried and true fix for everything: restart your computer, sudo apt update sudo apt upgrade to see if it fixes itself.

All of these commands should be ran as root. Delete the symlink, rm /tmp/.X11-unix, run vncserver (to set up another symlink), then kex should work. If it does not, make sure that you are on WSL-2, and try running through this part of the tutorial you linked again

Open PowerShell as administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Restart

Open PowerShell as administrator and run:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Restart

Make sure that you restart when they tell you to. If none of these work, sudo apt remove win-kex, then sudo apt-autoremove and start the tutorial from the beginning. Also as a side note, seamless mode seems to not work on windows 11 beta for me at least.

1
  • 1
    Thank you! All I had to do was run rm /tmp/.X11-unix and vncserver then it worked. Appreciate it. Commented Oct 28, 2021 at 21:36
0

In addition to the above I had a similar problem on Windows 10 and Windows 11 PCs.  Kept hanging after kex command – Task Manager showed Vmmem task running but Kali Win KeX GUI never starts.  I looked at kali.exe link in winapps and wondered about 0 byte size.  This led to win system settings apps / app exec aliases.  I switched Kali alias off on, then it all worked...

2
  • 1
    Please edit your answer to describe more clearly the action you took to resolve the problem. Commented Apr 17, 2022 at 20:52
  • I will check into this further. But until then, the above method somehow worked for me. Even though I had done that for the Kali KeX installation I had thought. Commented May 21, 2022 at 23:16
-1

Your X-DISPLAY= :1 is set to :1, it should be :0 once i do it I'll paste my process and results I've had same thing but your post sparked a memory and I was like crap mine said :1 as well. You have to change the :1 value to a :0 value to read the display right.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .