Use portable flatpak command in .desktop launcher#209
Open
digiArchitect wants to merge 1 commit into
Open
Conversation
Replace hardcoded /usr/bin/flatpak with bare 'flatpak' so the launcher works on distros where flatpak lives elsewhere (e.g. NixOS), and drop --arch=x86_64 so the native architecture is used on ARM machines. Fixes Diolinux#127 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
The
Execline in.local/share/applications/org.gimp.GIMP.desktophardcodes two things that break the PhotoGIMP launcher on some systems (reported in #127, and the arch half also noted in #200):/usr/bin/flatpak— not all distros put the flatpak binary there. On NixOS/usr/bincontains onlyenv, so clicking the PhotoGIMP icon silently does nothing. Per the Desktop Entry spec, a bare executable name is resolved via$PATH, which is what most Flatpak-exported.desktopfiles use.--arch=x86_64— on aarch64 machines (e.g. Asahi Linux, ARM laptops) this forces a non-installed architecture and the launcher fails. Removing the flag lets flatpak pick the native arch.Change
One line, no other changes.
How to test
flatpak install flathub org.gimp.GIMP.desktopfile to~/.local/share/applications/and runupdate-desktop-database ~/.local/share/applications(or log out/in).gio launch ~/.local/share/applications/org.gimp.GIMP.desktoporgtk-launch org.gimp.GIMP./usr/bin) and on an aarch64 machine — both previously failed silently, both should now launch.desktop-file-validate org.gimp.GIMP.desktopreports no new errors.Fixes #127