D18762: Add support for portals in KRun

Denis Karpovskii noreply at phabricator.kde.org
Tue Feb 5 17:01:32 GMT 2019


GeeXT created this revision.
GeeXT added a reviewer: jgrulich.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
GeeXT requested review of this revision.

REVISION SUMMARY
  Currently KRun in Flatpak/Snap doesn't support portals so it can't launch an application
  for a given url (because it can't break through sandbox). This patch allows KRun to use
  portals to pass the url through sandbox. QDesktopServices::openUrl handles that case and sends
  appropriate DBus calls to portals, so URIs will be proccessed accordingly by host system.
  
  FEATURE: 399380

TEST PLAN
  I couldn't build KIO from master in current flatpak KDE runtime (even without the patch), so here are commands to test the patch on top
  of KIO 5.54.1:
  
  1. Install org.kde.Sdk 5.12 from flathub
  2. Install org.kde.konversation from KDE Nightly flatpak repo (https://community.kde.org/Guidelines_and_HOWTOs/Flatpak)
  3. Apply the patch to KIO 5.54.1
  4. run 'flatpak run --filesystem=host --command=sh --devel org.kde.Sdk//5.12' to enter SDK
  5. build KIO
  6. exit SDK (exit or Ctrl+D)
  7. run flatpak shell with Konversation 'flatpak run --filesystem=host --command=sh org.kde.konversation'
  8. run LD_PRELOAD="path/to/libKF5KIOCore.so path/top/libKF5KIOWidgets.so path/to/libKF5KIOFileWidgets.so" /app/bin/konversation
  
  to run it with just compiled KIO (the compiled libraries are located in bin directory inside your build directory)
  Now link clicks should pass sandbox and do the appropriate actions (open browser for http links, email application for mailto links,
  file manager for file://...)

REPOSITORY
  R241 KIO

BRANCH
  flatpak_open_url (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D18762

AFFECTED FILES
  src/widgets/krun.cpp

To: GeeXT, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190205/23892613/attachment.html>


More information about the Kde-frameworks-devel mailing list