xdg-desktop-portal is a D-Bus service that allows applications to interact with the desktop in a safe way. Several aspects of desktop interaction, like file chooser, desktop style, etc are implemented in different D-Bus APIs, known as portals. Sandboxed applications benefit the most from this service since they don't need special permissions to use the portal APIs, but any application can use it. xdg-desktop-portal safeguards many resources and features with a user-controlled permission system. This service needs a backend implementing desktop-specific portal interfaces.
This package is known to build and work properly using an LFS 12.4 platform.
Download (HTTP): https://github.com/flatpak/xdg-desktop-portal/releases/download/1.20.3/xdg-desktop-portal-1.20.3.tar.xz
Download SHA256 Sum: 4bfb164937f59107eb1a3cc21abaa948d903c76f3b99fac210cea38ce1da9edc
Download MD5 sum: 28c2d9b9bbeff811f2d999e1b985c728
Download size: 3,442.2 KB
Estimated disk space required: 19,132.1 KB
Estimated build time: less than 0.2 SBU
Fuse-3.17.4, gdk-pixbuf-2.44.4, JSON-GLib-1.10.8, pipewire-1.4.9, and dbus-1.16.2 (at runtime). Furthermore, a backend is needed at runtime for this package to be of any use, either xdg-desktop-portal-gtk-1.15.3 or "xdg-desktop-portal-gnome" or "xdg-desktop-portal-lxqt"
bubblewrap-0.11.0 and docutils-0.22.3 (for building the manual pages)
![[Note]](../images/note.png)
Although there is an option to build the package without bubblewrap, upstream developers and LFS editors alike highly recommend to not use this possibility, as it will create a large security issue.
Prepare xdg-desktop-portal by running the following commands:
meson setup build --prefix=/usr --buildtype=release -D tests=disabled
ninja -C build
The optional dependencies are not installed to run the testsuite.
Now Install the package, as the root user:
ninja -C build install
-D tests=disabled: Prevents requiring
several optional dependencies that are only needed for tests.
The main configuration files are
~/.config/xdg-desktop-portal/portals.conf,
/etc/xdg-desktop-portal/portals.conf, and
/usr/share/xdg-desktop-portal/portals.conf.
Several other locations can be searched for configuration files. See
portals.conf(5).
The various configuration files are used to choose the backend depending of various conditions. See portals.conf(5) for details.