Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ node_modules/
# OS-specific files
.DS_Store
Thumbs.db

# VSCode workspace
*.code-workspace
117 changes: 59 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@



***THIS IS AN UNOFFICIAL BUILD SCRIPT!***

If you run into an issue with this build script, make an issue here. Don't bug Anthropic about it - they already have enough on their plates.

# Claude Desktop for Fedora 43

This is a modified version of the Claude Desktop build script, fixed to work on **Fedora 43** (Wayland/KDE Plasma).

**Fixes in this version:**
- **Fedora 43 Support**: Updated dependencies and build process
- **Google Sign-In Fixed**: Implemented a native module stub to allow Google authentication to work
- **Layout Fixes**: Fixed window scaling and maximizing glitches
- **Titlebar Gap Fixed (v8)**: Root cause fix - patches titlebar height constants from 36px to 0
- **Auto-Update**: Script automatically downloads the latest Claude Desktop version

# Claude Desktop for Linux

This project was inspired by [k3d3's claude-desktop-linux-flake](https://github.com/k3d3/claude-desktop-linux-flake) and their [Reddit post](https://www.reddit.com/r/ClaudeAI/comments/1hgsmpq/i_successfully_ran_claude_desktop_natively_on/) about running Claude Desktop natively on Linux. Their work provided valuable insights into the application's structure and the native bindings implementation.

And now by me, via [Aaddrick's claude-desktop-debian](https://github.com/aaddrick/claude-desktop-debian), modified to work for Fedora 41.
And now by me, via [Aaddrick's claude-desktop-debian](https://github.com/aaddrick/claude-desktop-debian), modified to work for Fedora 43.

Supports MCP!
![image](https://github.com/user-attachments/assets/93080028-6f71-48bd-8e59-5149d148cd45)
Expand All @@ -22,77 +32,60 @@ Supports the Ctrl+Alt+Space popup!
Supports the Tray menu! (Screenshot of running on KDE)
![image](https://github.com/user-attachments/assets/ba209824-8afb-437c-a944-b53fd9ecd559)

# Installation Options
# Installation

## Fedora Package (Updated for latest version!)

For Fedora-based distributions you can build and install Claude Desktop using the provided build script.

## 1. Fedora Package (New!)
**What's New (v8):**

For Fedora-based distributions you can build and install Claude Desktop using the provided build script (updated):
- **Titlebar gap eliminated (ROOT CAUSE FIX)** - Patches height constants (`?0:36` -> `?0:0`) in the bundled JavaScript
- **Why v8 works**: Claude Desktop reserves 36px for titlebar via ternary patterns. Patching these to 0 eliminates the gap at source.
- **Auto-download latest version** - Script fetches the latest Claude Desktop automatically
- **Native title bar support** - No more double title bar issue
- **Fedora 43 Wayland/KDE compatibility** - Automatic environment configuration

```bash
sudo dnf install rpm-build
# Install build dependencies
sudo dnf install rpm-build p7zip nodejs npm

# Clone this repository
git clone https://github.com/bsneed/claude-desktop-fedora.git
git clone https://github.com/boujuan/claude-desktop-fedora.git
cd claude-desktop-fedora

# Build the package
# Build the package (downloads Electron 37 automatically)
chmod +x build-fedora.sh
sudo ./build-fedora.sh

# Install the package
# Check what file was actually created
ls build/electron-app/$(uname -m)/

# Install using the correct filename (example - your version may differ)
sudo dnf install build/electron-app/$(uname -m)/claude-desktop-*.rpm

# Download standalone Electron
# The installed Claude Desktop will have GTK conflicts with your system Electron. Download a clean Electron binary
cd /tmp
wget https://github.com/electron/electron/releases/download/v37.0.0/electron-v37.0.0-linux-x64.zip

# Extract into /opt
sudo unzip electron-v37.0.0-linux-x64.zip -d /opt
sudo mv /opt/electron-v37.0.0-linux-x64 /opt/electron
sudo chmod +x /opt/electron/electron

# Fix the Claude Desktop Script The default script will try to use your system Electron. Replace it with one that uses the standalone version:

# Backup the original script
sudo cp /usr/bin/claude-desktop /usr/bin/claude-desktop.backup

# Create the fixed script
sudo tee /usr/bin/claude-desktop << 'EOF'
#!/usr/bin/bash
LOG_FILE="$HOME/claude-desktop-launcher.log"

# Set environment to avoid GTK conflicts
export GDK_BACKEND=x11
export GTK_USE_PORTAL=0
export ELECTRON_DISABLE_SECURITY_WARNINGS=true

# Use the standalone electron installation
/opt/electron/electron /usr/lib64/claude-desktop/app.asar --ozone-platform-hint=auto --enable-logging=file --log-file=$LOG_FILE --log-level=INFO --disable-gpu-sandbox --no-sandbox "$@"
EOF

# Make it executable
sudo chmod +x /usr/bin/claude-desktop
sudo dnf install $(uname -m)/claude-desktop-*.rpm

# Launch Claude Desktop
claude-desktop

```

Installation video here : https://youtu.be/dvU1yJsyJ5k
**That's it!** The launcher script includes all necessary fixes:
- Native KDE/GNOME title bar (no double title bar)
- GTK conflict prevention for Fedora 42+
- Proper electron path for app drawer compatibility
- All necessary sandbox and logging flags

Installation video here: https://youtu.be/dvU1yJsyJ5k

Requirements:
- Fedora 41 Linux distribution
**Requirements:**
- Fedora 41+ Linux distribution (tested on Fedora 43)
- Node.js >= 12.0.0 and npm
- Root/sudo access for dependency installation

## 2. Debian Package (New!)
**Known Issues:**
- If upgrading from an older build, you may need to uninstall the old package first: `sudo dnf remove claude-desktop`

For Debian users, please refer to [Aaddrick's claude-desktop-debian](https://github.com/aaddrick/claude-desktop-debian) repository. Their implementation is specifically designed for Debian and provides the original build script that inspired THIS project.
## Debian Package

## 3. NixOS Implementation
For Debian users, please refer to [Aaddrick's claude-desktop-debian](https://github.com/aaddrick/claude-desktop-debian) repository. Their implementation is specifically designed for Debian and provides the original build script that inspired THIS project.

## NixOS Implementation

For NixOS users, please refer to [k3d3's claude-desktop-linux-flake](https://github.com/k3d3/claude-desktop-linux-flake) repository. Their implementation is specifically designed for NixOS and provides the original Nix flake that inspired this project.

Expand All @@ -103,7 +96,8 @@ Claude Desktop is an Electron application packaged as a Windows executable. Our
1. Downloads and extracts the Windows installer
2. Unpacks the app.asar archive containing the application code
3. Replaces the Windows-specific native module with a Linux-compatible implementation
4. Repackages everything into a proper RPM package
4. Applies titlebar and frame fixes for proper Linux desktop integration
5. Repackages everything into a proper RPM package

The process works because Claude Desktop is largely cross-platform, with only one platform-specific component that needs replacement.

Expand Down Expand Up @@ -132,11 +126,12 @@ The replacement module is carefully designed to match the original API while pro
The build script (`build-fedora.sh`) handles the entire process:

1. Checks for a Fedora-based system and required dependencies
2. Downloads the official Windows installer
2. Downloads the official Windows installer (auto-fetches latest version)
3. Extracts the application resources
4. Processes icons for Linux desktop integration
5. Unpacks and modifies the app.asar:
- Replaces the native module with our Linux version
- Applies titlebar fixes (height constant patching, native frame, CSS backup)
- Updates keyboard key mappings
- Preserves all other functionality
6. Creates a proper RPM package with:
Expand All @@ -145,13 +140,20 @@ The build script (`build-fedora.sh`) handles the entire process:
- Proper dependency management
- Post-install configuration

## Updating the Build Script
## Updating

The script automatically downloads the latest version of Claude Desktop from the official Anthropic servers using their redirect API. Simply re-run the build script to update:

```bash
sudo ./build-fedora.sh
sudo dnf install $(uname -m)/claude-desktop-*.rpm
```

When a new version of Claude Desktop is released, simply update the `CLAUDE_DOWNLOAD_URL` constant at the top of `build-deb.sh` to point to the new installer. The script will handle everything else automatically.
**Manual Version Override:** If you need to build a specific version (for testing or compatibility), you can edit the `CLAUDE_DOWNLOAD_URL` at the top of `build-fedora.sh` to point to a specific installer URL.

# License

The build scripts in this repository, are dual-licensed under the terms of the MIT license and the Apache License (Version 2.0).
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](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE) for details.

Expand All @@ -162,4 +164,3 @@ The Claude Desktop application, not included in this repository, is likely cover
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.
# claude-desktop-fedora
Loading