Bug 446719 - xdg-open failed to open file using flatpak app with uppercase id
Summary: xdg-open failed to open file using flatpak app with uppercase id
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-09 08:55 UTC by hypengn
Modified: 2022-01-17 20:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hypengn 2021-12-09 08:55:56 UTC
SUMMARY
xdg-desktop-portal-kde get a wrong id of flatpak app, which cause desktop file can't be found  
example: 
should be "org.libreoffice.LibreOffice" but get "org.libreoffice.libreoffice"  
should be "com.wps.Office" but get "com.wps.office"  
should be "io.github.peazip.PeaZip" but get "io.github.peazip.peazip"  


Debug with "G_MESSAGES_DEBUG=all /usr/libexec/xdg-desktop-portal --verbose --replace"
got log:  
DP: Opening app chooser
XDP: Running app windows changed, wake up monitor thread
XDP: Running app windows changed, wake up monitor thread
XDP: Received choice org.libreoffice.libreoffice
XDP: Cannot launch org.libreoffice.libreoffice.desktop because desktop file does not exist


STEPS TO REPRODUCE
1.  "flatpak run --command=bash org.mozilla.firefox"
2.  "xdg-open ~/Downloads/Document1.docx"
3.  Choose LibreOffice installed by flatpak
4.  nothing happened  
Can also be reproduced with WPS office or opening zip with Peazip  

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: fedora 35
(available in About System)
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
https://invent.kde.org/frameworks/kservice/-/merge_requests/69