View Issue Details

IDProjectCategoryView StatusLast Update
0008110Kali LinuxGeneral Bugpublic2023-04-11 03:39
Reporternullific Assigned Tore4son  
PriorityimmediateSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Product Version2022.4 
Summary0008110: Kali-win-kex unable to connect to socket, Failed to activate virtual keyboard: 2, Error in VcXsvr.
Description

Unable to initialize Kex using both sudo and normal user.

Including failure to initialize virtual keyboard when sending the command:

kex --sl
sudo kex --sl
kex --win
sudo kex --win
kex --esm
sudo kex --esm

Steps To Reproduce

Go through the normal installation for kali-win-kex and WSL.

kex --sl

you should get the following errors in the log (my error log as an example):

Welcome to the VcXsrv X Server
Vendor: The VcXsrv Project
Release: 1.20.14.0

OS: Windows NT 10.0 build 22000 (64-bit)
Contact: [email protected]

LoadPreferences: C:\Users\57pat\AppData\Roaming.XWinrc not found
LoadPreferences: Loading \wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\system.XWinrc
(II) AIGLX: Testing pixelFormatIndex 5
(II) GLX: enabled GLX_SGI_make_current_read
(II) GLX: enabled GLX_SGI_swap_control
(II) GLX: enabled GLX_MESA_swap_control
(II) GLX: enabled GLX_SGIX_pbuffer
(II) GLX: enabled GLX_ARB_multisample
(II) GLX: enabled GLX_SGIS_multisample
(II) GLX: enabled GLX_ARB_fbconfig_float
(II) GLX: enabled GLX_EXT_fbconfig_packed_float
(II) GLX: enabled GLX_ARB_create_context
(II) GLX: enabled GLX_ARB_create_context_profile
(II) GLX: enabled GLX_ARB_create_context_robustness
(II) GLX: enabled GLX_EXT_create_context_es2_profile
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) 670 pixel formats reported by wglGetPixelFormatAttribivARB
(II) GLX: Initialized Win32 native WGL GL provider for screen 0
[xkb] Starting '"\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\57pat\AppData\Local\Temp\xkb_a06412" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\57pat\AppData\Local\Temp\server-3.xkm"' failed: Incorrect function.
(EE) Error compiling keymap (server-3) executing '"\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\57pat\AppData\Local\Temp\xkb_a06412" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\57pat\AppData\Local\Temp\server-3.xkm"'
(EE) XKB: Couldn't compile keymap
(EE) XKB: Failed to load keymap. Loading default keymap instead.
[xkb] Starting '"\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\57pat\AppData\Local\Temp\xkb_a06412" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\57pat\AppData\Local\Temp\server-3.xkm"' failed: Incorrect function.
(EE) Error compiling keymap (server-3) executing '"\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\57pat\AppData\Local\Temp\xkb_a06412" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\57pat\AppData\Local\Temp\server-3.xkm"'
(EE) XKB: Couldn't compile keymap
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
(EE)
Fatal server error:
(EE) Failed to activate virtual core keyboard: 2(EE)
(EE) Server terminated with error (1). Closing log file.

Additional Information

Removing, Uninstalling, and purging of Kali-win-kex doesn't work or solve the issue either.

I've also tried removing .X11-unix using

sudo rm -rf /tmp/.X11-unix/

That also didn't solve my issue.

Here's the things I tried to fix or solve the issue.

sudo kex --kill
sudo kex --stop

sudo apt remove kali-win-kex
sudo apt purge kali-win-kex
sudo apt-get install kali-win-kex

kex --sl --wtstart -s (This still gave me errors and it still doesn't fix the issue)

This issue is the same for all types and configurations for kex

--win (broken)
--esm (refused to connect to both localhost and container)
--sl (broken and virtual keyboard failed to initialize, including unable to connect)
running normal kex is also broken as you can see this is the result I receive below:

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.

Attached Files
image.png (10,190 bytes)   
image.png (10,190 bytes)   
image-2.png (3,455 bytes)   
image-2.png (3,455 bytes)   
image-3.png (9,634 bytes)   
image-3.png (9,634 bytes)   

Activities

debigare

debigare

2023-01-12 19:57

reporter   ~0017394

Reproduced on my Windows 10 machine. The issue appeared recently, as this was working perfectly fine for me on the same machine before Microsoft stopped supporting the native version of WSL in favor of the Microsoft Store version.

I suspect this is happening because WSL now mounts /tmp/.X11-unix as read-only. More details here:
https://github.com/microsoft/WSL/issues/9303

palyn

palyn

2023-02-17 19:32

reporter   ~0017524

I have the same problem.

palyn

palyn

2023-02-17 19:58

reporter   ~0017525

I have the same problem (Win-KeX in Seamless Mode can't start) with the latest version WSL from Store:

WSL: 1.0.3.0
kernel: 5.15.79.1
WSLg: 1.0.47
MSRDC: 1.2.3575
Direct3D: 1.606.4
DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows: 10.0.19045.2604

I've tried to launch Win-KeX on laptop with older version WSl and it worked. So I uninstall WSL version from Store and just using version from Windows Optional Features.
Attempting to understand and searching a solution I found several similar issues, here they are:

https://github.com/microsoft/WSL/discussions/6108
https://sourceforge.net/p/vcxsrv/bugs/145/
https://sourceforge.net/p/vcxsrv/discussion/986201/thread/060a1574fb/
https://gitlab.com/kalilinux/packages/kali-win-kex/-/issues/13
https://gitlab.com/kalilinux/packages/kali-win-kex/-/issues/15
https://github.com/microsoft/WSL/issues/9333
https://github.com/microsoft/WSL/discussions/6675#discussioncomment-2132011

And here is possible cause of the problem.

win-kexsl_root.log (3,055 bytes)   
Welcome to the VcXsrv X Server
Vendor: The VcXsrv Project
Release: 1.20.14.0

OS: Windows NT 10.0 build 19045 (64-bit)
Contact: [email protected]

LoadPreferences: C:\Users\XXX\AppData\Roaming\.XWinrc not found
LoadPreferences: Loading \\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\system.XWinrc
(II) AIGLX: Testing pixelFormatIndex 5
(II) GLX: enabled GLX_SGI_make_current_read
(II) GLX: enabled GLX_SGI_swap_control
(II) GLX: enabled GLX_MESA_swap_control
(II) GLX: enabled GLX_SGIX_pbuffer
(II) GLX: enabled GLX_ARB_multisample
(II) GLX: enabled GLX_SGIS_multisample
(II) GLX: enabled GLX_ARB_fbconfig_float
(II) GLX: enabled GLX_EXT_fbconfig_packed_float
(II) GLX: enabled GLX_ARB_create_context
(II) GLX: enabled GLX_ARB_create_context_profile
(II) GLX: enabled GLX_ARB_create_context_robustness
(II) GLX: enabled GLX_EXT_create_context_es2_profile
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) 724 pixel formats reported by wglGetPixelFormatAttribivARB
(II) GLX: Initialized Win32 native WGL GL provider for screen 0
[xkb] Starting '"\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\XXX\AppData\Local\Temp\xkb_a10336" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\XXX\AppData\Local\Temp\server-3.xkm"' failed: ������� �����.

(EE) Error compiling keymap (server-3) executing '"\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\XXX\AppData\Local\Temp\xkb_a10336" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\XXX\AppData\Local\Temp\server-3.xkm"'
(EE) XKB: Couldn't compile keymap
(EE) XKB: Failed to load keymap. Loading default keymap instead.
[xkb] Starting '"\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\XXX\AppData\Local\Temp\xkb_a10336" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\XXX\AppData\Local\Temp\server-3.xkm"' failed: ������� �����.

(EE) Error compiling keymap (server-3) executing '"\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\XXX\AppData\Local\Temp\xkb_a10336" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\XXX\AppData\Local\Temp\server-3.xkm"'
(EE) XKB: Couldn't compile keymap
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
(EE) 
Fatal server error:
(EE) Failed to activate virtual core keyboard: 2(EE) 
(EE) Server terminated with error (1). Closing log file.
win-kexsl_root.log (3,055 bytes)   
win-kexsl_xxx.log (3,055 bytes)   
Welcome to the VcXsrv X Server
Vendor: The VcXsrv Project
Release: 1.20.14.0

OS: Windows NT 10.0 build 19045 (64-bit)
Contact: [email protected]

LoadPreferences: C:\Users\XXX\AppData\Roaming\.XWinrc not found
LoadPreferences: Loading \\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\system.XWinrc
(II) AIGLX: Testing pixelFormatIndex 5
(II) GLX: enabled GLX_SGI_make_current_read
(II) GLX: enabled GLX_SGI_swap_control
(II) GLX: enabled GLX_MESA_swap_control
(II) GLX: enabled GLX_SGIX_pbuffer
(II) GLX: enabled GLX_ARB_multisample
(II) GLX: enabled GLX_SGIS_multisample
(II) GLX: enabled GLX_ARB_fbconfig_float
(II) GLX: enabled GLX_EXT_fbconfig_packed_float
(II) GLX: enabled GLX_ARB_create_context
(II) GLX: enabled GLX_ARB_create_context_profile
(II) GLX: enabled GLX_ARB_create_context_robustness
(II) GLX: enabled GLX_EXT_create_context_es2_profile
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) 724 pixel formats reported by wglGetPixelFormatAttribivARB
(II) GLX: Initialized Win32 native WGL GL provider for screen 0
[xkb] Starting '"\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\XXX\AppData\Local\Temp\xkb_a35920" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\XXX\AppData\Local\Temp\server-3.xkm"' failed: ������� �����.

(EE) Error compiling keymap (server-3) executing '"\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\XXX\AppData\Local\Temp\xkb_a35920" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\XXX\AppData\Local\Temp\server-3.xkm"'
(EE) XKB: Couldn't compile keymap
(EE) XKB: Failed to load keymap. Loading default keymap instead.
[xkb] Starting '"\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\XXX\AppData\Local\Temp\xkb_a35920" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\XXX\AppData\Local\Temp\server-3.xkm"' failed: ������� �����.

(EE) Error compiling keymap (server-3) executing '"\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbcomp" -w 1 "-R\\wsl.localhost\kali-linux\usr\lib\win-kex\VcXsrv\xkbdata" -xkm "C:\Users\XXX\AppData\Local\Temp\xkb_a35920" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "C:\Users\XXX\AppData\Local\Temp\server-3.xkm"'
(EE) XKB: Couldn't compile keymap
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
(EE) 
Fatal server error:
(EE) Failed to activate virtual core keyboard: 2(EE) 
(EE) Server terminated with error (1). Closing log file.
win-kexsl_xxx.log (3,055 bytes)   

Issue History

Date Modified Username Field Change
2022-12-20 13:32 nullific New Issue
2022-12-20 13:32 nullific File Added: image.png
2022-12-20 13:32 nullific File Added: image-2.png
2022-12-20 13:32 nullific File Added: image-3.png
2022-12-20 15:48 daniruiz Assigned To => re4son
2022-12-20 15:48 daniruiz Status new => assigned
2023-01-12 19:57 debigare Note Added: 0017394
2023-02-17 19:32 palyn Note Added: 0017524
2023-02-17 19:58 palyn File Added: win-kexsl_root.log
2023-02-17 19:58 palyn File Added: win-kexsl_xxx.log
2023-02-17 19:58 palyn Note Added: 0017525