Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kimi Desktop Linux patches

Unofficial compatibility patches for running the Windows build of Kimi Desktop under Wine or Bottles on Linux.

The repository does not redistribute Kimi Desktop, Electron, account data, API keys, or any Kimi binary. It only contains a source-level patch and tooling that applies it to a locally installed copy.

Tested version

  • Kimi Desktop 3.1.6
  • Electron 41.7.2
  • Bottles Flatpak
  • Wine on Linux Mint/Cinnamon
  • 96 DPI / 100% display scale

Application updates may replace resources/app.asar. Reapply the patch after an update only if the installed Kimi version is still supported.

Fixes

  • Opens Google OAuth and other external links through winebrowser.exe, with Electron's normal external-link handler as a fallback.
  • Uses the native Wine window frame instead of combining it with Electron's Windows title-bar overlay.
  • Removes the extra 32-pixel renderer title-bar reservation and auto-hides the Wine menu bar.
  • Pins Chromium input scaling to 1:1 to prevent vertically offset mouse hitboxes at 96 DPI.
  • Keeps the Chat renderer alive for at least 30 minutes, preventing the first Work-to-Chat switch from rebuilding the entire view.
  • Makes tray creation idempotent, avoids Wine tray duplication during theme updates, and destroys the tray icon cleanly on exit.

Requirements

  • A local Kimi Desktop 3.1.6 installation
  • Bash
  • Node.js and npm
  • GNU patch
  • Internet access the first time the script downloads @electron/asar

Close Kimi Desktop before applying or restoring the patch.

Install

git clone https://github.com/gnustella-lab/kimi-linux-patches.git
cd kimi-linux-patches
./scripts/apply.sh "/path/to/kimi-desktop"

For a Kimi installation inside a Bottles Flatpak prefix, the final argument is the directory that contains Kimi.exe and resources/app.asar.

The installer:

  1. extracts app.asar into a temporary directory;
  2. verifies Kimi Desktop 3.1.6;
  3. checks that the patch applies cleanly;
  4. creates a timestamped backup beside the original ASAR;
  5. validates the patched JavaScript with node --check;
  6. repacks and atomically replaces app.asar.

It prints the exact backup path on success.

Restore

Restore the newest backup:

./scripts/restore.sh "/path/to/kimi-desktop"

Or restore a specific backup:

./scripts/restore.sh "/path/to/kimi-desktop" \
  "/path/to/app.asar.kimi-linux-backup-YYYYMMDD-HHMMSS"

Bottles notes

  • Use one running Bottles instance for a prefix. Multiple Wine explorers using the same prefix can leave stale tray icons and poison Electron's network service.
  • Keep the bottle at 96 DPI when using the included 1:1 mouse-coordinate fix.
  • If Work is stuck at 99% with Connection lost, fully close the Kimi process and reopen it. A clean restart lets Kimi refresh the account token and create the local model credential.
  • Logs are normally stored under the Wine user's AppData/Roaming/kimi-desktop/logs/main.log.

See Troubleshooting for diagnostic details.

Compatibility and safety

The patch checks the application version and exact code context before changing anything. Set KIMI_PATCH_FORCE=1 only if you have reviewed the patch against a newer Kimi release yourself.

This project is not affiliated with Moonshot AI or Kimi. Kimi and Kimi Desktop are trademarks of their respective owners. The MIT license covers only the original scripts and documentation in this repository; upstream application code remains subject to its original terms.

About

Unofficial Wine and Bottles compatibility patches for Kimi Desktop on Linux

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages