kkdesk

command module
v0.1.0-beta.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: AGPL-3.0 Imports: 33 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

kkdesk

English | 简体中文 | 日本語

A native remote desktop written in Go with Tango. The UI is self-drawn and the remote screen is shown in the system's native video view, with hardware H.264 on both ends.

One app, two roles: share this computer's screen, or view and control another one. On a LAN, connect by address and password. Across networks, connect by device code through a server you host yourself. No third-party cloud and no account.

The app's interface is currently in Chinese; the names of settings below are translations.

Status: prototype. It works, but it has not had a first release yet. Both ends must run the same version (connection authentication v2 is not compatible with earlier builds).

Screenshots

Desktop (macOS)
My devices File transfer
macOS My devices page macOS File transfer page
Mobile (iOS)
Device list (iPhone) Browsing computer files
iPhone device list iOS browsing computer files

Features

  • Remote control and view-only, with a per-session control center for quality, frame rate, view-only and window size. The remote pointer shape (hand, text beam, resize…) follows the host.
  • File transfer: browse, upload and download files and folders, with checksums, cancel and a per-session permission switch.
  • Clipboard sync for text, with a per-session permission switch.
  • Privacy screen: black out the host's displays while the controller still sees and controls the desktop. The host chooses never / ask each time / allow.
  • Lock screen: lock the host on disconnect (with a grace period for dropped connections), or lock it from the control center.
  • Remote unlock (optional component): with the lock screen component installed on the host, the controller sees the lock screen and can unlock it; the password can be remembered in the controller's keychain.
  • Security: the host signs every answer with its device identity; the controller checks it against the device code or the identity remembered for that LAN address; the password is proven only inside the encrypted DTLS channel; repeated wrong passwords pause password logins.
  • My devices: address book with groups and online checks, session history, fixed or rotating temporary passwords. Everything is stored locally.
  • Mobile app (Flutter, mobile/): pair by QR code, control a computer, browse and transfer its files.
  • Self-hosted cross-network service (kkdesk-server): device-code signaling and a TURN relay; clients pick a direct WebRTC path or the relay automatically.

Platforms

Platform Host (share screen) Controller Notes
macOS ✅ ✅ ScreenCaptureKit, VideoToolbox H.264, AVSampleBufferDisplayLayer, CGEvent
Windows x64 ✅ (being verified on real machines) ✅ DXGI Desktop Duplication, Media Foundation H.264, D3D11 video processor, SendInput
Linux x64 / arm64 — file transfer only capture and remote display are not implemented yet
iOS / Android — ✅ Flutter app in mobile/

Getting started

Download the installer for your system and architecture. Open the DMG and drag kkdesk to Applications on macOS. On Windows x64, run setup.exe to install for the current user. On Linux x64 or ARM64, use the AppImage or install the deb on Debian or Ubuntu. GitHub Releases

  1. On the computer to be controlled, turn on Allow remote control. The Connect page shows its LAN addresses, a temporary password and, with a cross-network service configured, its KD-… device code.
  2. On the controlling computer, enter the address or device code and the password, then Connect. If Ask before connecting is on, the host accepts the request.

macOS hosts need the Screen Recording permission, and Accessibility to be controlled. See the user guide (Chinese) for details.

Build from source

Requires Go 1.27 and tan. The project uses cgo.

tan dev                                    # run the main window with hot reload
CGO_ENABLED=1 go build -o kkdesk .          # macOS build
./kkdesk -host                             # host: print addresses and a temporary password
./kkdesk -connect 192.168.1.20:21118 -password 123456   # controller
./kkdesk -selftest                         # capture, encode and input self test
scripts/build-windows.sh                   # cross-build kkdesk.exe on macOS (needs mingw-w64)

Self-hosted cross-network service

kkdesk-server runs on a Linux server with a public IPv4 address, with either a domain and HTTPS or an IP address and a pinned public key. On Debian or Ubuntu:

curl -fsSL -o install-server.sh https://raw.githubusercontent.com/tangoui/kkdesk/main/scripts/install-server.sh &&
  sudo bash install-server.sh desk.example.com 203.0.113.10

Then enter the same server address and service token on both computers under Settings › Cross-network. See the deployment guide (Chinese) for ports, manual setup and the configuration file.

License

GNU AGPL-3.0

Documentation

Overview

kkdesk is a remote desktop built with Tango. Its window is drawn by package ui (no WebView); the remote screen is a native video view hosted with uihost.NativeHost.

One binary, two roles: without flags it opens the main window (what "tan dev" runs) and shares this screen; -host does the same and prints one machine-readable line, -connect controls another machine (see flags.go).

Directories

Path Synopsis
cmd
kkdesk-server command
kkdesk-server provides device rendezvous and TURN for kkdesk.
kkdesk-server provides device rendezvous and TURN for kkdesk.
lockspike/win command
internal
app
Package app wires the kkdesk pipelines: the host shares this screen (capture → encode → session, session input → inject) and the viewer shows a remote one (session → decode → display, UI input → session).
Package app wires the kkdesk pipelines: the host shares this screen (capture → encode → session, session input → inject) and the viewer shows a remote one (session → decode → display, UI input → session).
capture
Package capture grabs the main display as NV12 frames.
Package capture grabs the main display as NV12 frames.
clipsync
Package clipsync keeps the clipboard text of the two ends of a session in step.
Package clipsync keeps the clipboard text of the two ends of a session in step.
codec
Package codec provides H.264 video encoding and decoding behind platform-independent interfaces.
Package codec provides H.264 video encoding and decoding behind platform-independent interfaces.
config
Package config is kkdesk's local configuration: the settings of the 设置 page and the address book of 我的设备.
Package config is kkdesk's local configuration: the settings of the 设置 page and the address book of 我的设备.
display
Package display shows decoded video frames in a native view (macOS: an AVSampleBufferDisplayLayer; Windows: a window with a flip-model swap chain fed by a D3D11 video processor), and maps pointer positions in the view to normalized video coordinates.
Package display shows decoded video frames in a native view (macOS: an AVSampleBufferDisplayLayer; Windows: a window with a flip-model swap chain fed by a D3D11 video processor), and maps pointer positions in the view to normalized video coordinates.
files
Package files transfers files and folders between the controller (Client) and the host (Server) over one ordered, reliable data channel.
Package files transfers files and folders between the controller (Client) and the host (Server) over one ordered, reliable data channel.
inject
Package inject posts remote input events (mouse, keyboard, wheel) to the local session.
Package inject posts remote input events (mouse, keyboard, wheel) to the local session.
input
Package input defines the binary wire format for remote input events sent from the viewer to the host over WebRTC data channels.
Package input defines the binary wire format for remote input events sent from the viewer to the host over WebRTC data channels.
lockscreen
Package lockscreen connects the host to an optional local lock screen component.
Package lockscreen connects the host to an optional local lock screen component.
privacy
Package privacy provides the native operations for a host desktop session.
Package privacy provides the native operations for a host desktop session.
rendezvous
Package rendezvous exchanges connection offers between authenticated devices.
Package rendezvous exchanges connection offers between authenticated devices.
stats
Package stats records per-frame timestamps on either end of a session, aggregates them once per second into JSON Lines (fps, bitrate, loss, latency percentiles, per-segment medians, CPU) and summarises such a log.
Package stats records per-frame timestamps on either end of a session, aggregates them once per second into JSON Lines (fps, bitrate, loss, latency percentiles, per-segment medians, CPU) and summarises such a log.
ui
Package appui is kkdesk's interface (directory internal/ui): the main window (sidebar navigation; the 连接 page with this machine's address and password, the form to control another machine and the recent connections; 我的设备, 远程会话, 文件传输 and 设置; the incoming-connection confirmation and the controlled-side panel) and the session window (tab strip with stats and 控制中心, the remote screen as a native video view).
Package appui is kkdesk's interface (directory internal/ui): the main window (sidebar navigation; the 连接 page with this machine's address and password, the form to control another machine and the recent connections; 我的设备, 远程会话, 文件传输 and 设置; the incoming-connection confirmation and the controlled-side panel) and the session window (tab strip with stats and 控制中心, the remote screen as a native video view).
unlockcred
Package unlockcred stores controller-supplied unlock credentials locally.
Package unlockcred stores controller-supplied unlock credentials locally.
update
Package update configures kkdesk's self-update: Tango's service/updater checks a signed manifest published with each GitHub release, downloads the new version (a binary patch when possible), installs it after kkdesk quits and rolls back if the new version does not start.
Package update configures kkdesk's self-update: Tango's service/updater checks a signed manifest published with each GitHub release, downloads the new version (a binary patch when possible), installs it after kkdesk quits and rolls back if the new version does not start.
winmedia
Package winmedia holds what the Windows capture, codec (encoder and decoder) and display backends share: one process-wide Direct3D 11 device (on the adapter that owns the primary display, multithread protected, wrapped in an IMFDXGIDeviceManager for Media Foundation), a D3D11 video processor that converts and scales the desktop image to NV12, HRESULT formatting and a logger.
Package winmedia holds what the Windows capture, codec (encoder and decoder) and display backends share: one process-wide Direct3D 11 device (on the adapter that owns the primary display, multithread protected, wrapped in an IMFDXGIDeviceManager for Media Foundation), a D3D11 video processor that converts and scales the desktop image to NV12, HRESULT formatting and a logger.
scripts
anim command
Command anim keeps a large part of the screen changing every frame, the content the loopback measurement captures (scripts/loopback.sh): moving coloured bars and a millisecond clock (for photo-based glass-to-glass checks).
Command anim keeps a large part of the screen changing every frame, the content the loopback measurement captures (scripts/loopback.sh): moving coloured bars and a millisecond clock (for photo-based glass-to-glass checks).
capdiag command
Command capdiag captures the main display for a few seconds and prints per-frame timing: SCK frame status counts, delivery interval, SCK display time vs callback arrival, and encode-call→output latency measured from arrival and from display time.
Command capdiag captures the main display for a few seconds and prints per-frame timing: SCK frame status counts, delivery interval, SCK display time vs callback arrival, and encode-call→output latency measured from arrival and from display time.
summary command
Command summary prints the stats.Summary of kkdesk JSON Lines logs.
Command summary prints the stats.Summary of kkdesk JSON Lines logs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL