Page 1 of 1

xdg-desktop-portal - the way of the future for flatpaks/appimages?

Posted: Fri Aug 05, 2022 6:10 pm
by artemis

There is apparently a thing called xdg-desktop-portal.

https://wiki.archlinux.org/title/Xdg-desktop-portal

xdg-desktop-portal offers a way for Flatpak applications to integrate with the desktop. It can allow applications to open URL's, share your screen and more. Depending on the implementation for your desktop there is a confirmation dialog before the application is able to access some portals.

https://github.com/flatpak/xdg-desktop-portal

xdg-desktop-portal works by exposing a series of D-Bus interfaces known as portals under a well-known name (org.freedesktop.portal.Desktop) and object path (/org/freedesktop/portal/desktop).

The portal interfaces include APIs for file access, opening URIs, printing and others.

I had never heard of this before but today I installed an AppImage for a program called ImHex and the file/folder selector buttons did nothing! But it was apparently because it uses xdg-desktop-portal for that. Anyway, I installed xdg-desktop-portal and xdg-desktop-portal-gtk from ppm and everything worked just fine after that without me having to do anything else.


Re: xdg-desktop-portal - the way of the future for flatpaks/appimages?

Posted: Fri Aug 05, 2022 8:11 pm
by puddlemoon

Not only for appimage/flatpack,
I have had to add xdg-desktop-portal and xdg-desktop-portal-gtk for one of my audio apps. It was needed to create an open/save dialog in the native gtk format.