Skip to content

claude-desktop-native/claude-desktop-native

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Desktop Native for Arch Linux

AUR Version AUR License AUR Votes AUR Popularity AUR Maintainer AUR Last Modified

Note: This is a community-maintained package and is not affiliated with Anthropic. Use at your own risk.

Overview

This unofficial AUR package brings Claude Desktop to Arch Linux natively, allowing you to use Anthropic's AI assistant with MCP servers on your Linux machine without virtualization or emulation.

Attribution

This package relies on the patchy-cnb library created by k3d3 as part of the claude-desktop-linux-flake project. All credit for the technical solution goes to k3d3.

Installation

# Using yay
yay -S claude-desktop-native

# Using paru
paru -S claude-desktop-native

# Manual installation
git clone https://aur.archlinux.org/claude-desktop-native.git
cd claude-desktop-native
makepkg -si

Features

  • Native Claude Desktop experience on Arch Linux
  • Modified native bindings for Linux compatibility via patchy-cnb
  • Preserves all functionality of the official Claude Desktop application (including MCP support)
  • Seamless desktop environment integration (icons, shortcuts, etc.)
  • Transparent implementation with no additional telemetry

Implementation

The project works by:

  1. Obtaining the official Windows executable
  2. Extracting the application from the Windows executable
  3. Replacing Windows-specific native bindings with Linux-compatible alternatives
  4. Repackaging everything to work with the system's Electron installation

The core functionality is provided by patchy-cnb, which implements Linux versions of the claude-native-bindings that Claude Desktop expects.

Technical Documentation

File Structure

After installation, files are organized as follows:

/usr/
├── bin/
│   └── claude-desktop-native
├── lib/
│   └── claude-desktop-native/
│       ├── app.asar
│       ├── app.asar.unpacked
│       │   └── node_modules
│       │       └── claude-native
│       │           └── claude-native-binding.node
│       └── resources/
│           ├── de-DE.json
│           ├── en-US.json
│           ├── en-XA.json
│           ├── en-XB.json
│           ├── es-419.json
│           ├── es-ES.json
│           ├── fr-FR.json
│           ├── hi-IN.json
│           ├── id-ID.json
│           ├── it-IT.json
│           ├── ja-JP.json
│           ├── ko-KR.json
│           ├── pt-BR.json
│           ├── [email protected]
│           ├── [email protected]
│           ├── [email protected]
│           ├── [email protected]
│           ├── TrayIconTemplate-Dark.png
│           ├── TrayIconTemplate.png
│           ├── Tray-Win32-Dark.ico
│           ├── Tray-Win32.ico
│           ├── xx-AC.json
│           ├── xx-HA.json
│           └── xx-LS.json
└── share/
    └── icons/
        └── hicolor/
            ├── 16x16
            │   └── apps/
            │       └── claude.png
            ├── 24x24
            │   └── apps/
            │       └── claude.png
            ├── 256x256
            │   └── apps/
            │       └── claude.png
            ├── 32x32
            │   └── apps/
            │       └── claude.png
            ├── 48x48
            │   └── apps/
            │       └── claude.png
            └── 64x64
                └── apps/
                    └── claude.png

All libraries and resources are stored in /usr/lib/claude-desktop-native to ensure compatibility with the system's Electron installation. All icons are stored in /usr/share/icons/hicolor for desktop environment integration. The binary is symlinked to /usr/bin/claude-desktop-native for easy access.

  • The binary is just a wrapper script that executes exec electron /usr/lib/claude-desktop-native/app.asar "$@".

Build Process

The package build follows these steps:

  1. Download Phase:

    • Fetches the official Windows installer (.exe)
    • Fetches the patchy-cnb library source code
    • Verifies checksum to ensure integrity
  2. Extraction Phase:

    • Uses 7z to extract Claude-Setup-x64.exe
    • Uses 7z to extract the AnthropicClaude-${pkgver}-full.nupkg package
    • Uses asar to extract the app.asar file which contains the Electron application
  3. Patching Phase:

    • Builds the patchy-cnb library from source using Rust
    • Replaces Windows-specific .node native modules with the newly compiled patchy-cnb ones
    • Replaces the RIe() and HD() functions of the .vite/build/index.js with ones that simply return the absolute path of the resources folder within the applications directory
  4. Packaging Phase:

    • Organizes files into the proper directory structure
    • Creates desktop integration files (icons, launchers)
    • Sets up the executable wrapper to use the system's Electron

Native Binding Replacement

The critical part of the process is replacing Windows-native .node files with Linux-compatible alternatives:

  1. Windows-specific native modules (*.node) are identified in the application
  2. These are typically used for:
    • System integration
    • Clipboard operations
    • Window management
    • Notification handling
  3. The patchy-cnb library provides compatible implementations of these functions for Linux
  4. During build, the Windows .node files are replaced with the newly compiled Linux versions

Configuration

MCP configuration is handled in $XDG_CONFIG_DIRS/Claude/claude_desktop_config.json.

Debugging

For troubleshooting, you can:

  1. Run the application from terminal to see output:

    ELECTRON_ENABLE_LOGGING=1 claude-desktop-native
  2. Inspect logs in:

    ~/.local/share/claude-desktop-native/logs/
    
  3. Verify native binding loading by checking:

    ldd /usr/share/claude-desktop-native/app.asar.unpacked/node_modules/@anthropic-ai/patchy-cnb/patchy-cnb.node

Native modules are intentionally installed without execution permissions as they are loaded directly by Node.js using dlopen(), which only requires read access.

Dependencies

  • electron (runtime)
  • cargo (make)
  • icoutils (make)
  • imagemagick (make)
  • nodejs (make)
  • npm (make)
  • p7zip (make)
  • rust (make)
  • tar (make)
  • docker (optional) – for running MCP servers

Community Projects

Similar community-maintained packages for other distributions:

NixOS

Debian

Ubuntu

Troubleshooting

Issue Solution
Blank screen on startup Verify Electron version compatibility
Authentication fails Check account credentials and internet connection
Missing icons Verify the icons were installed in /usr/share/icons
Restart your computer or log out and back in

For other issues, please open an issue on GitHub.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

  • Build scripts and packaging code: Dual-licensed under MIT License and Apache License 2.0
  • Claude Desktop: Proprietary software owned by Anthropic
  • patchy-cnb library: Created by k3d3, dual-licensed under MIT and Apache 2.0

Acknowledgments

  • k3d3 for creating patchy-cnb and the original implementation
  • The Anthropic team for creating Claude
  • The Arch Linux community for their package management system

About

Upstream repo for the claude-desktop-native AUR package.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages