Bug 401789

Summary: GNU Octave Flathub app isn't launching with Discover UI
Product: [Applications] Discover Reporter: Alexander Mentyu <notuxius>
Component: Flatpak BackendAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: jgrulich, nate
Priority: NOR    
Version First Reported In: 5.14.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: CLI of Octave after launching with 'flatpak run org.octave.Octave' command

Description Alexander Mentyu 2018-12-05 19:02:26 UTC
STEPS TO REPRODUCE
1. Open Discover.
2. Search for 'GNU Octave' flatpak app.
3. Install it.
4. Launch it from Discover UI.

OBSERVED RESULT
The app isn't launching

SOFTWARE/OS VERSIONS
Operating System: KDE neon Developer Edition
KDE Plasma Version: 5.14.80
KDE Frameworks Version: 5.53.0
Qt Version: 5.11.2
Kernel Version: 4.15.0-42-generic

ADDITIONAL INFORMATION
The app is launching from Application Launcher
Comment 1 Alexander Mentyu 2018-12-05 19:10:09 UTC
'octave-gui' and two 'bwrap' processes appear in the System Monitor for less than 1 sec when launching from Discover UI
Comment 2 Nate Graham 2018-12-08 04:52:36 UTC
Can you launch it from the command line?

`flatpak run org.octave.Octave`?
Comment 3 Alexander Mentyu 2018-12-13 11:45:16 UTC
(In reply to Nate Graham from comment #2)
> Can you launch it from the command line?
> 
> `flatpak run org.octave.Octave`?

It launches command line interface
Comment 4 Alexander Mentyu 2018-12-13 11:47:39 UTC
Created attachment 116890 [details]
CLI of Octave after launching with 'flatpak run org.octave.Octave' command
Comment 5 Nate Graham 2018-12-13 14:42:12 UTC
Oh, so it's a command-line only app that happens to be distributed using Flatpak?

Aleix, thoughts on how we can handle this? Can the app advertise that it needs to be run in a terminal such that we could have Discover launch Konsole with it or something?
Comment 6 Alexander Mentyu 2018-12-13 17:05:47 UTC
flatpak run --branch=stable --arch=x86_64 --command=/app/bin/octave --file-forwarding org.octave.Octave --gui

launches GUI version - this is the command from .desktop file of this app
Comment 7 Aleix Pol 2018-12-13 18:45:09 UTC
Git commit 8c059ef7dc697175c65336487b6171aec631caca by Aleix Pol.
Committed on 13/12/2018 at 18:42.
Pushed by apol into branch 'master'.

flatpak: prefer starting applications using the desktop file

Some applications (see bug) may need some further arguments and in the end
we want to run the application like the user will from the menu or
krunner.

M  +2    -0    libdiscover/CMakeLists.txt
M  +1    -4    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +14   -0    libdiscover/backends/FlatpakBackend/FlatpakResource.cpp
M  +1    -0    libdiscover/backends/FlatpakBackend/FlatpakResource.h
M  +0    -2    libdiscover/backends/PackageKitBackend/CMakeLists.txt
R  +0    -0    libdiscover/config-paths.h.cmake [from: libdiscover/backends/PackageKitBackend/config-paths.h.cmake - 100% similarity]

https://commits.kde.org/discover/8c059ef7dc697175c65336487b6171aec631caca