# Razer Linux Desktop A Tauri + Leptos desktop app for configuring supported Razer devices on Linux. ## CachyOS / Arch Setup Install the Tauri Linux build dependencies: ```sh sudo pacman -S --needed \ webkit2gtk-4.1 \ base-devel \ curl \ wget \ file \ openssl \ appmenu-gtk-module \ libappindicator-gtk3 \ librsvg \ xdotool ``` Make sure the Rust Tauri CLI and Trunk are available: ```sh cargo install tauri-cli --locked cargo install trunk --locked ``` ## Build From this directory: ```sh NO_STRIP=true cargo tauri build ``` `NO_STRIP=true` avoids a known AppImage bundling failure on rolling Linux distributions where linuxdeploy's bundled `strip` can fail on newer ELF sections. The AppImage is written under: ```text target/release/bundle/appimage/ ``` ## Install Desktop Launcher This installs the built AppImage into a stable per-user path and creates a desktop launcher. The launcher continues to work after updates because the AppImage is always copied to the same filename. ```sh appimage="$(find target/release/bundle/appimage -maxdepth 1 -name 'razer-linux-desktop_*_amd64.AppImage' -print -quit)" mkdir -p "$HOME/.local/opt/razer-linux-desktop" mkdir -p "$HOME/.local/share/applications" mkdir -p "$HOME/.local/share/icons/hicolor/128x128/apps" install -m 0755 "$appimage" \ "$HOME/.local/opt/razer-linux-desktop/razer-linux-desktop.AppImage" install -m 0644 src-tauri/icons/128x128.png \ "$HOME/.local/share/icons/hicolor/128x128/apps/one.daichendt.razer-linux-desktop.png" cat > "$HOME/.local/share/applications/one.daichendt.razer-linux-desktop.desktop" </dev/null || true gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" 2>/dev/null || true kbuildsycoca6 2>/dev/null || true ``` After this, the app should appear in the desktop environment launcher as `Razer Linux Desktop`. ## Update Installed App Pull the latest source, rebuild, and replace the stable AppImage: ```sh git pull --ff-only NO_STRIP=true cargo tauri build appimage="$(find target/release/bundle/appimage -maxdepth 1 -name 'razer-linux-desktop_*_amd64.AppImage' -print -quit)" install -m 0755 "$appimage" \ "$HOME/.local/opt/razer-linux-desktop/razer-linux-desktop.AppImage" ``` The desktop launcher does not need to be recreated unless the launcher metadata or icon changes. ## Uninstall ```sh rm -f "$HOME/.local/share/applications/one.daichendt.razer-linux-desktop.desktop" rm -f "$HOME/.local/share/icons/hicolor/128x128/apps/one.daichendt.razer-linux-desktop.png" rm -rf "$HOME/.local/opt/razer-linux-desktop" update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" 2>/dev/null || true kbuildsycoca6 2>/dev/null || true ```