Skip to content

Use portable flatpak command in .desktop launcher#209

Open
digiArchitect wants to merge 1 commit into
Diolinux:masterfrom
digiArchitect:bugfix/Issue-127
Open

Use portable flatpak command in .desktop launcher#209
digiArchitect wants to merge 1 commit into
Diolinux:masterfrom
digiArchitect:bugfix/Issue-127

Conversation

@digiArchitect

@digiArchitect digiArchitect commented Jul 7, 2026

Copy link
Copy Markdown

Problem

The Exec line in .local/share/applications/org.gimp.GIMP.desktop hardcodes two things that break the PhotoGIMP launcher on some systems (reported in #127, and the arch half also noted in #200):

  1. /usr/bin/flatpak — not all distros put the flatpak binary there. On NixOS /usr/bin contains only env, 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 .desktop files use.
  2. --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

-Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=gimp --file-forwarding org.gimp.GIMP @@u %U @@
+Exec=flatpak run --branch=stable --command=gimp --file-forwarding org.gimp.GIMP @@u %U @@

One line, no other changes.

How to test

  1. Install GIMP from Flathub: flatpak install flathub org.gimp.GIMP
  2. Copy the patched .desktop file to ~/.local/share/applications/ and run update-desktop-database ~/.local/share/applications (or log out/in).
  3. Click the PhotoGIMP icon in the app menu — GIMP should launch. You can also test from a terminal with gio launch ~/.local/share/applications/org.gimp.GIMP.desktop or gtk-launch org.gimp.GIMP.
  4. Regression check on a mainstream distro (Ubuntu/Fedora, x86_64): launcher still opens GIMP and image files still open via "Open with".
  5. If available, repeat step 3 on NixOS (flatpak not in /usr/bin) and on an aarch64 machine — both previously failed silently, both should now launch.
  6. Optional: desktop-file-validate org.gimp.GIMP.desktop reports no new errors.

Fixes #127

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

change /usr/bin/flatpak to flatpak in the .desktop

1 participant