Repository navigation
Description
Describe the bug
The AppImage bundler creates .DirIcon and the root .desktop symlinks using absolute paths that point to the build machine's filesystem. When the AppImage is packed into SquashFS and mounted at runtime (e.g. /tmp/.mount_AppXXXXXX/), these symlinks are dangling because the original build path doesn't exist on the user's machine.
In crates/tauri-bundler/src/bundle/linux/appimage/linuxdeploy.rs lines 174-180:
// .DirIcon — absolute symlink (broken)
std::os::unix::fs::symlink(
app_dir_path.join(format!("{product_name}.png")),
app_dir_path.join(".DirIcon"),
)?;
// .desktop — absolute symlink (broken)
std::os::unix::fs::symlink(
app_dir_path.join(format!("usr/share/applications/{product_name}.desktop")),
app_dir_path.join(format!("{product_name}.desktop")),
)?;app_dir_path.join(...) produces an absolute path like /home/runner/work/.../bundle/appimage/App.AppDir/App.png. This gets baked into the symlink target, which doesn't resolve when mounted.
Reproduction
- Build any Tauri 2.x app as AppImage on Linux
- Extract the AppImage:
./App.AppImage --appimage-extract - Inspect the symlinks:
ls -la squashfs-root/.DirIcon ls -la squashfs-root/App.desktop
- Both point to absolute build-machine paths that don't exist
Expected behavior
Symlinks should use relative paths:
// .DirIcon — relative symlink (correct)
std::os::unix::fs::symlink(
format!("{product_name}.png"),
app_dir_path.join(".DirIcon"),
)?;
// .desktop — relative symlink (correct)
std::os::unix::fs::symlink(
format!("usr/share/applications/{product_name}.desktop"),
app_dir_path.join(format!("{product_name}.desktop")),
)?;This matches the AppDir specification which expects .DirIcon to resolve within the mounted AppDir.
Full tauri info output
[✔] Environment
- OS: Mac OS 26.2.0 arm64 (X64)
✔ rustc: 1.92.0 (ded5c06cf 2025-12-08)
✔ cargo: 1.92.0 (344c4567c 2025-10-21)
[-] Packages
- tauri 🦀: 2.10.2
- tauri-build 🦀: 2.5.5
- wry 🦀: 0.54.2
- tao 🦀: 0.34.5
Note: bug is in the bundler source, reproducible on any version. Confirmed present on latest main branch.
Additional context
- Reported downstream: [BUG] AppImage .DirIcon broken cjpais/Handy#895
- Affects all Tauri 2.x AppImage builds on Linux
- The icon files themselves are valid — only the symlink targets are wrong
- The fix is a 2-line change in
linuxdeploy.rs— happy to open a PR if desired
Activity
fix: use relative symlinks for .DirIcon and .desktop in AppImage
yangtzech commentedon Jun 28, 2026
Hi, we're hitting this same issue — AppImage built on CI has broken
.DirIconand.desktopsymlinks pointing to absolute build-machine paths (/home/runner/work/...). This causes installation failures on user machines (e.g. via AppManager).A few questions on the current status:
linuxdeploy.rslooks straightforward (switchingapp_dir_path.join(...)to relative paths).Appreciate the maintainers' time on this — thanks!
FabianLars commentedon Jun 28, 2026
I'll fix it myself today or so. I don't think i can deal with a single more AI generated PR for this one line fix.
bump @tauri-apps/cli to ~2.11.4 to fix linux app icon issue (#4858)
bump @tauri-apps/cli to ~2.11.4 to fix linux app icon issue (block#4858)
bump @tauri-apps/cli to ~2.11.4 to fix linux app icon issue (block#4858)
Update @tauri-apps/cli version to 2.11.5
build(deps-dev): bump @tauri-apps/cli from 2.11.2 to 2.11.4
bump @tauri-apps/cli to ~2.11.4 to fix linux app icon issue (block#4858)
fix(linux): 修复 AppImage 的 .DirIcon 绝对路径软链接
Upgrade Tauri CLI to 2.12.0 for AppImage fixes
bump @tauri-apps/cli to ~2.11.4 to fix linux app icon issue (block#4858)