Skip to content

h-filzer/claude-desktop-arch

Claude Desktop for Arch Linux

This repo is mainly unmaintained. Please consider using the Claude-Desktop App-Image instead as it is more up-to-date. Things I noticed while using the App-Image are:

  • It requires fuse2 to be installed on your system. You can install it via your package manager (e.g. sudo pacman -S fuse2).
  • Copy the App-Image to a location where you want to keep it in your $PATH.
  • It does not create a menu entry automatically. You can create one manually containing the following in /usr/share/applications/claude-desktop.desktop pointing to the installed location (EXEC) of the App-Image if not in the PATH:
[Desktop Entry]
Name=Claude
Exec=claude-desktop %u
Icon=claude-desktop
Type=Application
Terminal=false
Categories=Office;Utility;
MimeType=x-scheme-handler/claude;
StartupWMClass=Claude

and run sudo update-desktop-database /usr/share/applications to register the claude:// URL scheme.

  • For me the login via "google" did not work. I had to use the "Sign in with email" option and follow the link to authenticate.

If u want to use this Repo anyway, you can follow the instructions below.

This repository contains a PKGBUILD file to build and install Claude Desktop on Arch Linux and Arch-based distributions (like Manjaro, EndeavourOS, etc.).

Current version: 0.13.19

Credits go to claude-desktop-debian which is the base for this repository.

Quick Links

Building and Installing

Option 1: Using the Installation Script

The easiest way to install is to use the provided installation script:

git clone https://github.com/h-filzer/claude-desktop-arch.git
cd claude-desktop-arch
./install.sh

This script will:

  1. Check if you're running an Arch-based system
  2. Install all required dependencies (will prompt for sudo password)
  3. Build the package as a regular user (not as root)
  4. Install the built package (will use sudo)

Important: Do not run the script with sudo, as makepkg should not be run as root. The script will use sudo only when necessary for installing dependencies and the final package.

Option 2: Manual Build

If you prefer to build the package manually:

  1. Clone this repository:
git clone https://github.com/h-filzer/claude-desktop-arch.git
cd claude-desktop-arch
  1. Build and install the package:
makepkg -si

The -si flag will install any required dependencies and the package after building. There's no need to manually install dependencies beforehand.

Important: Do not run makepkg with sudo, as it should not be run as root. The -si flag will automatically use sudo when needed to install dependencies and the package.

Manual Installation

If you prefer to install the package manually after building:

sudo pacman -U claude-desktop-arch-*.pkg.tar.zst

Running Claude Desktop

After installation, you can run Claude Desktop from your application menu or by typing:

claude-desktop

Permission Issues

If you encounter permission issues, make sure the launcher script is executable:

sudo chmod +x /usr/sbin/claude-desktop

When the login does not work you can try to run the following command to update the registered claude:// URL-sheme:

sudo update-desktop-database /usr/share/applications

When experiencing errors, have all claude pids killed by: ps awx | grep claude | grep -v grep | awk '{print $1}' | xargs kill -9

Updating

When a new version of Claude Desktop is released:

  1. Check for updates:

    ./check-version.sh
  2. Update manually (if new version found):

    # Edit PKGBUILD and update pkgver
    nano PKGBUILD
    
    # Regenerate .SRCINFO (requires makepkg)
    makepkg --printsrcinfo > .SRCINFO
    
    # Test the build
    ./setup-chroot.sh all
  3. Update the _download_url in PKGBUILD if the download location changes

See AUR.md for publishing updates to the AUR.

Development and Testing

This section describes how to set up a development environment and test the package build before distribution.

Using the Chroot Testing Environment

The setup-chroot.sh script provides an isolated testing environment that prevents potential issues with your main system. This is the recommended approach for testing package builds.

Important Notes:

  • The script automatically checks for and installs required dependencies (like arch-install-scripts) when you run it
  • Do not run the script as root - it will refuse to run and display an error
  • The chroot is created in a chroot-test directory relative to the script location
  • The test command runs with --noconfirm flag for automated builds

Available Commands

The script provides several commands to manage the chroot environment:

  • setup - Create the chroot environment (includes disabling pacman CheckSpace)
  • copy - Copy PKGBUILD to the chroot
  • enter - Enter the chroot environment for manual testing
  • test - Run automated package build test
  • cleanup - Remove the chroot environment
  • all - Run complete setup and test workflow

Note: The setup command automatically disables pacman CheckSpace to prevent mount point errors when installing packages in the chroot.

Quick Start

For a complete automated test:

./setup-chroot.sh all

This will:

  1. Check and install dependencies
  2. Create a clean chroot environment with CheckSpace disabled
  3. Copy the PKGBUILD and create builder user
  4. Build and test the package automatically
  5. Display built package files on success

Step-by-Step Manual Testing

If you prefer more control over the testing process:

# 1. Create the chroot environment
./setup-chroot.sh setup

# 2. Copy PKGBUILD to chroot
./setup-chroot.sh copy

# 3. Enter the chroot for manual testing
./setup-chroot.sh enter

# Inside the chroot:
su - builder
cd /home/builder
makepkg -s

# Exit the chroot
exit

# 4. Clean up when done
./setup-chroot.sh cleanup

Understanding the Chroot Environment

The chroot environment provides:

  • A minimal Arch Linux installation
  • Isolated filesystem to prevent system contamination
  • A dedicated builder user for safe package building (with passwordless sudo)
  • Automatic dependency resolution via makepkg -s
  • Disabled pacman CheckSpace for smooth package operations

Manual Testing Without Chroot

If you prefer to test directly on your system (not recommended for untested PKGBUILDs):

# Build the package without installing
makepkg

# Or build and install in one step
makepkg -C -f -si

Development Workflow

When modifying the PKGBUILD:

  1. Make your changes to the PKGBUILD file
  2. Test in chroot using ./setup-chroot.sh all
  3. Verify the package builds successfully
  4. Check the built package in chroot-test/home/builder/
  5. Test installation (optional) within the chroot
  6. Clean up with ./setup-chroot.sh cleanup

Troubleshooting

Common Issues

  1. "makepkg should not be run as root"

    • Never run the setup script or makepkg with sudo
    • The script will request sudo only when needed
  2. "Chroot directory already exists"

    • Run ./setup-chroot.sh cleanup first
    • Or answer 'y' when prompted to remove it
  3. Mount point errors in chroot

    • CheckSpace is automatically disabled during setup
    • This should not occur with the current version
  4. Build failures

    • Check the PKGBUILD for syntax errors
    • Ensure all dependencies are listed correctly
    • Review the build output for specific errors
  5. Electron version issues/missing en-US.json version Workaround

    • The client seems to want to use an existing electron installation which seems to be incompatible
    • uninstall electron via pacman
    • relaunch with sudo, this will install the correct version then fail
    • launch normally

Tips for Developers

  • Always test in a chroot environment before pushing changes
  • The chroot environment mimics a clean Arch installation
  • Built packages appear in chroot-test/home/builder/
  • You can copy built packages out of the chroot for distribution
  • Use makepkg -g to generate new checksums when updating sources

How It Works

This package:

  1. Downloads the Windows installer for Claude Desktop
  2. Extracts the necessary files and resources
  3. Creates a stub implementation for Windows-specific native modules
  4. Packages everything into an Arch Linux package
  5. Sets up desktop integration (icons, launcher, etc.)

License

This PKGBUILD is provided under the same license as the original claude-desktop-debian application:

The build scripts in this repository, are dual-licensed under the terms of the MIT license and the Apache License (Version 2.0).

See LICENSE-MIT and LICENSE-APACHE for details.

The Claude Desktop application, not included in this repository, is likely covered by Anthropic's Consumer Terms.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Claude Desktop for Arch Linux

Topics

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
Unknown
LICENSE-MIT

Contributing

Stars

Watchers

Forks

Contributors 13