You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use macOS DMG source with JS stubs, update to v1.1.1200
Major changes:
- Switch from Windows installer to macOS DMG (more reliable extraction)
- Replace Rust native bindings (patchy-cnb) with simple JavaScript stubs
- Update to Claude Desktop v1.1.1200
- Add Linux platform detection for Claude Code
- Fix tray icon theme detection for dark/light modes
- Simplify build process (no Rust compilation needed)
The previous Rust-based approach required compilation and had issues with
the tray menu patches injecting 'await' outside async contexts, causing
SyntaxError on startup. The JS stub approach matches what claude-desktop-debian
uses and is simpler to maintain.
If you would like to run [MCP servers with Claude Desktop](https://modelcontextprotocol.io/quickstart/user)on NixOS, use the `claude-desktop-with-fhs` package. This will allow running MCP servers with calls to `npx`, `uvx`, or `docker` (assuming docker is installed).
40
+
For [MCP servers](https://modelcontextprotocol.io/quickstart/user)(`npx`, `uvx`, `docker`), use the FHS variant:
This repository only provides a Nix flake, and does not provide a package for e.g. Ubuntu, Fedora, or Arch Linux.
52
-
53
-
Other known variants:
54
-
-https://github.com/aaddrick/claude-desktop-debian - A debian builder for Claude Desktop
55
-
-https://aur.archlinux.org/packages/claude-desktop-bin - An Arch package for Claude Desktop
56
-
-https://github.com/wankdanker/claude-desktop-linux-bash - A bash-based Claude Desktop builder that works on Ubuntu and possibly other Debian derivatives
57
-
58
-
If anyone else packages Claude Desktop for other distributions, make an issue or PR and I'll link it here.
59
-
60
-
# How it works
61
-
62
-
Claude Desktop is an Electron application. That means the majority of the application is inside an `app.asar` archive, which usually contains minified Javascript, HTML, and CSS, along with images and a few other things.
63
-
64
-
Despite there being no official Linux Claude Desktop release, the vast majority of the code is completely cross-platform.
Node, and by extension Electron, allow you to import natively-compiled objects into the Node runtime as if they were regular modules.
73
-
These are typically used to extend the functionality in ways Node itself can't do. Only problem, as shown above, is that these objects
74
-
are only compiled for one OS.
75
-
76
-
Luckily enough, because it's a loadable Node module, that means you can open it up yourself in node and inspect it - no decompilation or disassembly needed:
There are many functions here for getting monitor/window information, as well as for controlling the mouse and keyboard.
81
-
I'm not sure what exactly these are for - my best guess is something unreleased related to [Computer Use](https://docs.anthropic.com/en/docs/build-with-claude/computer-use),
82
-
however I'm not a huge fan of this functionality existing in the first place.
83
-
84
-
As for how to move forward with getting Claude Desktop working on Linux, seeing as how the API surface area of this module is relatively
85
-
small, it looked fairly easy to just wholesale reimplement it, using stubs for the functionality.
86
-
87
-
## `patchy-cnb`
45
+
## Other Distributions
88
46
89
-
The result of that is a library I call `patchy-cnb`, which uses NAPI-RS to match the original API with stub functions.
90
-
Turns out, the original module also used NAPI-RS. Neat!
From there, it's just a matter of compiling `patchy-cnb`, repackaging the app.asar to include the newly built Linux module, and
93
-
making a new Electron build with these files.
51
+
## How it Works
94
52
95
-
# License
53
+
Claude Desktop is an Electron app. The macOS DMG is extracted, patched for Linux compatibility, and repackaged:
96
54
97
-
The build scripts in this repository, as well as `patchy-cnb`, are dual-licensed under the terms of the MIT license and the Apache License (Version 2.0).
55
+
1. Extract `app.asar` from the macOS build
56
+
2. Patch title bar detection, platform checks, and tray icon handling
57
+
3. Replace `@ant/claude-native` Windows bindings with JavaScript stubs
58
+
4. Repackage with Linux Electron
98
59
99
-
See [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE) for details.
60
+
The native binding stubs provide no-op implementations for Windows-specific features (window effects, input emulation, etc.) that aren't needed on Linux.
100
61
101
-
The Claude Desktop application, not included in this repository, is likely covered by [Anthropic's Consumer Terms](https://www.anthropic.com/legal/consumer-terms).
62
+
## License
102
63
103
-
## Contribution
64
+
Build scripts are dual-licensed under MIT and Apache 2.0. See [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE).
104
65
105
-
Unless you explicitly state otherwise, any contribution intentionally submitted
106
-
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
107
-
additional terms or conditions.
66
+
Claude Desktop itself is covered by [Anthropic's Consumer Terms](https://www.anthropic.com/legal/consumer-terms).
0 commit comments