251.2. xdg-desktop-portal-gtk-1.15.3
GTK backend for xdg-desktop-portal — the GNOME and GTK settings, Print and Email portals
1.15.3-1 · LGPL-2.1-or-later · 0.1 SBU · 586.1 KiB, 6 files · 43_toolkits, 336 of 344 · ports/core/xdg/xdg-desktop-portal-gtk
Homepage: https://github.com/flatpak/xdg-desktop-portal-gtk
xdg-desktop-portal-gtk is the GTK backend behind xdg-desktop-portal. On KDOS it serves three interfaces the Plasma backend leaves to it: Settings for the GNOME and GTK keys, Print and Email for a caller that asks this backend by name. Every other interface is xdg-desktop-portal-kde’s.
Depends on: meson, glib, gtk3, xdg-desktop-portal, dbus, gsettings-desktop-schemas, fontconfig.
Required by: no port names it.
Sources: xdg-desktop-portal-gtk-1.15.3.tar.xz (92.3 KiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install xdg-desktop-portal-gtk'
build.sh:
meson setup build \
--prefix=/usr --sysconfdir=/etc --libdir=lib --libexecdir=/usr/lib \
--buildtype=release \
-Ddbus-service-dir=/usr/share/dbus-1/services \
-Dwallpaper=disabled \
-Dsettings=enabled \
-Dappchooser=disabled \
-Dlockdown=disabled
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
rm -rf "$PKG/usr/lib/systemd"
-Dsettings=enabled— Serve the Settings portal: everyorg.gnome.desktop.*key from GSettings, among them the GTK theme, the icon and cursor themes, the fonts,gtk-im-moduleand the window-button layout inorg.gnome.desktop.wm.preferences, andorg.gnome.fontconfig. GTK 4 on Wayland reads every one of those settings from the portal whenever it answers, and none fromsettings.ini; a key no backend returns takes GTK’s built-in fallback. GTK 3 on Wayland does the same whereverGTK_USE_PORTALis1, which is every host login and every box, with two exceptions:gtk-modulesandgtk-fontconfig-timestampcome from kde-gtk-config’sorg.gtk.Settings, which the host’s gtk3 is patched to open beside the portal (a box’s own GTK 3 is not, and its filtered bus does not reach the service), andgtk-im-moduleis set towaylandby GTK 3 itself on a compositor offeringtext-input-v3, above whatever the portal returns. The Plasma backend serves onlyorg.kde.*andorg.freedesktop.appearance, so without this one a GTK 4 program takesgtk-im-modulesimpleand gets no input method, drawsmenu:closeas its header-bar buttons, and wears Adwaita’s icons, cursor and font.enabledrather thanautomakes a missing gsettings-desktop-schemas or fontconfig fail the configure instead of building the backend without the interface.-Dwallpaper=disabled,-Dappchooser=disabled,-Dlockdown=disabled— The Plasma backend serves wallpaper and the application chooser, and lockdown has no settings source on KDOS.
Directories: /usr/share/licenses/xdg-desktop-portal-gtk.
The values it serves are the GSettings that kde-gtk-config’s kded module writes from the Plasma settings, through dconf, and it announces a changed key with SettingChanged.
kde-portals.conf, which plasma-workspace installs, names kde;gtk; for Settings. Where both backends answer a key, as for org.freedesktop.appearance, the front end takes the Plasma backend’s, so the colour scheme and accent stay Plasma’s. The portal file’s UseIn=gnome line is not consulted when a -portals.conf names the backend.
The install puts a systemd user unit under /usr/lib/systemd, which build.sh removes; the backend is started by D-Bus activation from its .service file’s Exec= line.