xdg-desktop-portal-1.20.4

#### Beyond Linux® From Scratch (System V Edition) - Version r13.0-584

### Chapter 25. Graphical Environment Libraries

- Prev

  WebKitGTK-2.52.0

- Next

  xdg-desktop-portal-gtk-1.15.3

- Up
- Home

# xdg-desktop-portal-1.20.4

## Introduction to xdg-desktop-portal

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.

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://github.com/flatpak/xdg-desktop-portal/releases/download/1.20.4/xdg-desktop-portal-1.20.4.tar.xz

- Download MD5 sum: d0ed229846b14d6c4cd252245f9a7970

- Download size: 1.2 MB

- Estimated disk space required: 32 MB (add 3 MB for tests)

- Estimated build time: 0.1 SBU (add 0.1 SBU for tests; with parallelism=4)

### xdg-desktop-portal Dependencies

#### Required

Fuse-3.18.2, gdk-pixbuf-2.44.6, JSON-GLib-1.10.8, pipewire-1.6.5, 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-50.0 or xdg-desktop-portal-lxqt-1.4.0

#### Recommended

bubblewrap-0.11.2 and docutils-0.22.4 (for building the manual pages)

### Note

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.

#### Optional

GeoClue-2.8.1 (for the “location” portal), and pytest-9.0.3 with libportal-0.9.1, dbusmock-0.38.1, and umockdev-0.19.7 (for running tests)

#### Optional (for building the documentation)

sphinx-9.1.0 with sphinxext.opengraph, sphinx_copybutton, furo, and flatpak

## Installation of xdg-desktop-portal

Install xdg-desktop-portal by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup --prefix=/usr --buildtype=release -D tests=disabled .. &&
    ninja

If the optional dependencies are installed, you can test the results by running:

    meson configure -D tests=enabled &&
    ninja test

Without the external dependencies one test, integration/dynamiclauncher is known to fail.

Now, as the `root` user:

    ninja install

Remove systemd files that are useless (as the `root` user):

    rm -rvf /usr/lib/systemd

## Command Explanations

`-D tests=disabled`: Prevents requiring several optional dependencies that are only needed for tests.

## Configuring xdg-desktop-portal

### Config Files

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).

### Configuration Information

The various configuration files are used to choose the backend depending of various conditions. See portals.conf(5) for details.

## Contents

Installed Programs: several daemons in /usr/libexec
Installed Librar(y,ies): None
Installed Director(y,ies): None

- Prev

  WebKitGTK-2.52.0

- Next

  xdg-desktop-portal-gtk-1.15.3

- Up
- Home