fix: auto-register Linux desktop icon on portable app start - #123
Open
VoidK2 wants to merge 1 commit into
Open
Conversation
VoidK2
force-pushed
the
fix/linux-portable-desktop-icons
branch
from
August 12, 2026 08:46
3ee2bc1 to
57f0008
Compare
VoidK2
force-pushed
the
fix/linux-portable-desktop-icons
branch
from
August 12, 2026 08:55
57f0008 to
19f436e
Compare
Portable Linux installs were launched from a tarball with no FreeDesktop entry, so launchers often fell back to a generic settings-style icon. On Linux startup, when portable-app.json is present next to the binary, silently refresh a user-level .desktop entry and a 256px icon under XDG_DATA_HOME. Uses the existing Tauri icon asset via include_bytes. No install script and no packaging layout change; failures are logged only and never block startup.
VoidK2
force-pushed
the
fix/linux-portable-desktop-icons
branch
from
August 12, 2026 08:57
19f436e to
361fcf9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Linux portable installs are just an extracted tarball. Without a proper FreeDesktop entry, app menu / desktop launchers often show a generic settings-style icon.
Users should not have to run an install script after every extract/update.
Approach
On Linux app startup, if this looks like a portable install (
portable-app.jsonnext to the executable):~/.local/share/icons/hicolor/256x256/apps/easycliproxyapi.png(embedded from existingsrc-tauri/icons/128x128@2x.png)~/.local/share/applications/easycliproxyapi.desktopwith absoluteExec=andIcon=update-desktop-database/gtk-update-icon-cacheNo packaging/script/README changes. No new user-facing step: open the app once after install/move.
Files
src-tauri/src/linux_desktop.rs(new)src-tauri/src/main.rs(call fromsetup)Test plan
cargo test linux_desktopon Linux CIExec=updates