Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Fix Linux AppImage packaging (#6657)

Wasim Yousef Said2aef1a23cb92
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index 884ff02d11c..6f1a7f14b17 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -353,7 +353,7 @@ jobs:
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
- sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev libssl-dev patchelf
+ sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libxdo-dev libssl-dev patchelf
# ── Node.js ──
- name: Setup Node.js
@@ -406,9 +406,24 @@ jobs:
if (config.bundle?.linux?.rpm) {
throw new Error('bundle.linux.rpm must not be configured');
}
+ if (config.bundle?.linux?.appimage?.bundleMediaFramework !== false) {
+ throw new Error('Linux AppImage bundleMediaFramework must stay false');
+ }
const workflow = readFileSync('.github/workflows/release-desktop.yml', 'utf8');
const lines = workflow.split(/\r?\n/);
+ const linuxInstallLines = lines.filter((line) => line.includes('sudo apt-get install'));
+ const ayatanaPackage = ['libayatana', 'appindicator3-dev'].join('-');
+ if (linuxInstallLines.some((line) => line.includes(ayatanaPackage))) {
+ throw new Error('Desktop Linux release must not install the Ayatana appindicator dev package');
+ }
+ if (!linuxInstallLines.some((line) => line.includes('libappindicator3-dev'))) {
+ throw new Error('Desktop Linux release must install libappindicator3-dev');
+ }
+ const linuxdeployLines = lines.filter((line) => line.includes('github.com/linuxdeploy/linuxdeploy/releases/download'));
+ if (!linuxdeployLines.some((line) => line.includes('1-alpha-20250213-2/linuxdeploy-x86_64.AppImage'))) {
+ throw new Error('Desktop Linux release must pin linuxdeploy 1-alpha-20250213-2');
+ }
const releaseBodies = [];
for (let i = 0; i < lines.length; i += 1) {
const match = lines[i].match(/^(\s*)releaseBody:\s*\|\s*$/);
@@ -568,6 +583,19 @@ jobs:
Get-Command trusted-signing-cli -ErrorAction SilentlyContinue || Write-Output "trusted-signing-cli NOT in PATH"
trusted-signing-cli --version || Write-Output "trusted-signing-cli failed to run"
+ # ── Linux: pin AppImage packaging toolchain ──
+ - name: Pin linuxdeploy for AppImage
+ if: matrix.platform == 'ubuntu-22.04'
+ shell: bash
+ run: |
+ set -euo pipefail
+ tools_dir="$RUNNER_TEMP/tauri-tools-cache/tauri"
+ mkdir -p "$tools_dir"
+ curl -fsSL \
+ "https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-x86_64.AppImage" \
+ -o "$tools_dir/linuxdeploy-x86_64.AppImage"
+ chmod +x "$tools_dir/linuxdeploy-x86_64.AppImage"
+
# ── Linux: build + sign + upload ──
- name: Build Linux app
if: matrix.platform == 'ubuntu-22.04'
@@ -576,6 +604,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
+ XDG_CACHE_HOME: ${{ runner.temp }}/tauri-tools-cache
with:
projectPath: studio
tauriScript: npx --prefix . tauri
diff --git a/.github/workflows/studio-tauri-smoke.yml b/.github/workflows/studio-tauri-smoke.yml
index 1156c264ae5..018857de68b 100644
--- a/.github/workflows/studio-tauri-smoke.yml
+++ b/.github/workflows/studio-tauri-smoke.yml
@@ -47,7 +47,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y \
- libwebkit2gtk-4.1-dev libayatana-appindicator3-dev \
+ libwebkit2gtk-4.1-dev libappindicator3-dev \
librsvg2-dev libxdo-dev libssl-dev patchelf
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
diff --git a/studio/src-tauri/src/main.rs b/studio/src-tauri/src/main.rs
index 1130ad2d5cd..4ed12051edb 100644
--- a/studio/src-tauri/src/main.rs
+++ b/studio/src-tauri/src/main.rs
@@ -159,36 +159,12 @@ fn setup_tray(app: &tauri::App) -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
-#[cfg(target_os = "linux")]
-fn apply_linux_appimage_webkit_workarounds() {
- if std::env::var_os("APPIMAGE").is_none() {
- return;
- }
-
- // AppImage bundles WebKitGTK/GTK while still using host Mesa/EGL.
- // On some rolling Linux stacks that mixed path leaves WebKit blank.
- set_env_if_missing("WEBKIT_DISABLE_COMPOSITING_MODE", "1");
- set_env_if_missing("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
-}
-
-#[cfg(target_os = "linux")]
-fn set_env_if_missing(key: &str, value: &str) {
- if std::env::var_os(key).is_none() {
- std::env::set_var(key, value);
- }
-}
-
-#[cfg(not(target_os = "linux"))]
-fn apply_linux_appimage_webkit_workarounds() {}
-
fn main() {
// Fix PATH for GUI apps (macOS .app bundles, Linux AppImage, Windows)
// GUI apps don't inherit shell dotfile PATH — this spawns the user's
// login shell to source .zshrc/.bashrc/.profile and sets PATH properly.
let _ = fix_path_env::fix();
- apply_linux_appimage_webkit_workarounds();
-
setup_logging();
info!("Unsloth Studio desktop app starting");
windows_job::initialize();
diff --git a/studio/src-tauri/tauri.conf.json b/studio/src-tauri/tauri.conf.json
index 5b521a2e159..51c4860e3c1 100644
--- a/studio/src-tauri/tauri.conf.json
+++ b/studio/src-tauri/tauri.conf.json
@@ -76,6 +76,9 @@
}
},
"linux": {
+ "appimage": {
+ "bundleMediaFramework": false
+ },
"deb": {
"postRemoveScript": "./linux/postremove.sh"
}