KEX(1)

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

SYNOPSYS
kex [mode] [command] [parameters]

DESCRIPTION

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

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

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

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

All 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 Snigdha OS 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 Snigdha OS 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 Snigdha OS 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).

Windows Subsystem for Linux GUI compatibility
    Win-KeX is fully compatible with WSLg. To achieve that, Win-KeX automatically moves away the incompatible socket directory created by Windows and re-creates it in a way that makes it compatible with both Win-KeX and WSLg. There are various command line options to manually configure the socket directory (i.e. wslg-remove, wslg-restore, wslg-status).

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

  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 (either for given mode or for all modes in no mode

--stop
    stop kex server

--stop-sound
    stop Windows sound server

--version
    display version

--wslg-remove
    Replace Windows propriatary X11 Unix socket directory with standard socket directory and relink X0 to WSLg to provide compatibility with both Win-KeX and WSLg. This is usually done automatically on startup and does not need to be run explicitly.

--wslg-restore
    Remove X11 Unix socket directory created with "--wslg-remove and re-create Windows propriatary X11 Unix socket directory. This will break compatibility with Win-KeX and will be removed the next time Win-KeX starts.

--wslg-status
    Display status of X11 Unix socket directory, either "WSLg" or "Win-KeX". "WSLg" is the default Windows configuration and not compatible with Win-KeX. "Win-KeX" is compatible with both Win-KeX and WSLg.

--wtstart
    start kex server and launch win-kex client in Windows Terminal session

  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 SL mode on the primary screen only or 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
VcXsrv Windows X Server

REPORTING BUGS
Snigdha OS Bug Tracker: https://github.com/Snigdha-OS/snigdhaos-wsl/issues