KEX(1)

NAME
kex - manual page for Win-KeX (Kali Desktop Experience for Windows)

SYNOPSYS
kex [mode] [command] [parameters]

DESCRIPTION

  Overview:
Win-KeX provides a GUI desktop environment for Kali Linux in Windows Subsystem for Linux 2 (WSL 2).
Win-KeX supports three modes:

Window Mode  (kex)
    Kali desktop in a dedicated window using VNC technologies.

Enhanced Session Mode (kex --esm)
    Kali desktop in a dedicated window using RDP protocol.

Seemless mode (kex --sl)
    Windows desktop is seemlessly shared between Kali and Windows applications via a Windows X Server.

Both modes support sound when launched with the -s command line parameter.

  Usage:

Win-KeX Window Mode
    Start: run kex --win to start the KeX server and launch the Win-KeX client. Use the -s parameter to enable sound support.
    Use: Press F8 to open the vnc viewer's context menu, which allows one to manage the client session.
    Disconnect: Press F8 and choose Exit viewer. The server session remains active and you can reconnect to it by starting the Win-KeX client via kex --start-client.
    Stop: To stop the Win-KeX session, run kex --stop.

Win-KeX Seemless Mode
    Start: run kex --sl to start KeX in seemless mode. The Kali Linux panel will pop up on top of the screen. Use the -s parameter to enable sound support. During the first launch, Win-KeX waits for the xfce desktop to start before it can enable the seemless mode, which usually takes less than 20 seconds. In the unlikely event that the startup exceeds 100 seconds on very slow machines, Win-KeX will time out and the Kali desktop might appear. If that ever happens, just use the -w or --wait argument to increase the timeout.
    Stop: Use the standard logout workflow to exit the Win-KeX session. To kill the Windows X Server, type kex --sl --stop.

    Tip: Enabling Autohide in the panel settings will avoid frustrations with the panel covering window title bars.

Win-KeX Enhanced Session Mode
    Start: run kex --esm to start KeX in enhanced session mode. When prompted for the ESM password, enter the kali password for the current user. The username and password will be saved in the Windows credential store. Click through the RDC connection warnings to start the client (Tip: tick the "Don't ask me again" checkbox). ESM mode is the only mode supported on Arm. WoA has a bug at the time of writing, causing a high level of packet loss when using "localhost"; use the -i or --ip argument to use the ip address instead.
    Stop: Use the standard logout workflow to exit the Win-KeX session. To kill the xrdp server, type kex --esm --stop.

Win-KeX as root
    To start Win-KeX as root, type sudo kex or sudo kex --sl. Note: Starting a Win-KeX Window session as root requires explicit authentication of the Win-KeX client. When prompeted for a password, enter the vnc password for the root session.

Multiple Win-KeX sessions
    You can comfortably run the following sessions in parallel:

    Win-KeX Win session as unprivileged user
    Win-KeX Win session as root user
    Win-KeX SL session as unprivileged or as root user

Windows firewall
    Win-KeX SL and sound support run server components in the Windows context, which require access through the Windows Defender Firewall. When prompted to allow traffic through the firewall, tick Public networks. You can later go into the Inbound Rules section of the Windows Defender Firewall Settings and restrict access for pulseaudio.exe and vcxsrv.exe to the WSL2 network (usually 172.3x.xxx.0/20).

OPTIONS

none
    start kex server in window mode and launch win-kex client

  Mode:

--esm
    Enhance Session Mode using the Windows RDP client. Best mode for Windows on Arm and HiDPI displays

--sl
    Seemlessly integrate KeX into the Windows desktop

--win
    Launch KeX desktop in a dedicated window (default mode)

  Command:

--help
    display help

--kill
    stop kex servers and kill all related processes

--passwd
    set kex server password (Window mode only)

--start
    start kex server

--start-client
    start kex client

--start-sound
    start Windows sound server

--status
    show kex server status (Window mode only)

--stop
    stop kex server

--stop-sound
    stop Windows sound server

--version
    display version

--wtstart
    start kex server and launch win-kex client in Windows Terminal session (Window mode only)

  Parameters:

-s, --sound
    start Windows sound server and launch KeX with sound support

  Advanced Parameters:

-i, --ip
    Use the IP address for the client connection rather than "localhost". Windows on Arm has a bug that causes a high rate of packet loss when using "localhost". The downside is, that the IP address changes after each reboot and with it the esm connection name requiring to enter the esm password again after each reboot.

-m, --multiscreen
    start Win mode in a window on the main screen for better multiscreen support. Just move the window to the preferred screen, press F8 and select Full screen

-n, --nowgl
    start SL mode without using the Windows native OpenGL library

-w, --wait
    Increase timeout in SL mode when waiting for desktop before enabling transparency. Might be required on slower machines.

SEE ALSO
Win-KeX utilises functions and programs from the following 3rd party packages:

    tigervncserver(1)
    tigervncviewer for Windows
    pulseaudio(1)
    pulseaudio for Windows
    VcXsrv Windows X Server

For information about these componenets please refer to the relevant manpage or online documentation.

AUTHORS
Kali Developers
devel@kali.org

Win-KeX utilises the following software, written by amazing people:
TigerVNC
Pulseaudio for Windows
VcXsrv Windows X Server

REPORTING BUGS
Kali Linux Bug Tracker: https://bugs.kali.org/