Bug 402393

Summary: flatpaks installed from within sandbox have wrong command path in theirs .desktop files
Product: [Applications] Discover Reporter: Andrey <butirsky>
Component: Flatpak BackendAssignee: Aleix Pol <aleixpol>
Status: RESOLVED NOT A BUG    
Severity: normal CC: jgrulich, katyaberezyaka, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrey 2018-12-20 19:09:47 UTC
For example, this is exported .desktop file visible from host:

$ grep Exec ~/.local/share/flatpak/exports/share/applications/org.kde.discover.desktop
Exec=/app/bin/flatpak run --branch=master --arch=x86_64 --command=plasma-discover --file-forwarding org.kde.discover @@ %F @@
Exec=/app/bin/flatpak run --branch=master --arch=x86_64 --command=plasma-discover org.kde.discover --mode update

, but there is no "/app/bin/flatpak" file on host. It's "/usr/bin/flatpak" instead.

One workaround here is to create "/app/bin/flatpak" symlink on host.
I wonder if any better solution possible.
Comment 1 Nate Graham 2018-12-28 05:16:05 UTC
Is this with the Flatpak-packaged version of Discover?
Comment 2 Andrey 2018-12-28 11:48:17 UTC
Yes, but it occurs even without Discover itself, when installing from within it's sandbox command line.
Comment 3 Aleix Pol 2019-01-07 16:43:01 UTC
I'm not sure this is really fixable from Discover. It's not discover who writes these files.
Comment 4 Nate Graham 2023-01-12 17:20:41 UTC
Indeed, this is not really fixable in any KDE code and arguably it's up to you to handle when you go poking about in the implementation.