Skip to content

xdg-portal

Recipe card from the charly-selkies plugin (Images — the deployable catalog).

xdg-portal - XDG Desktop Portal Infrastructure

Section titled “xdg-portal - XDG Desktop Portal Infrastructure”

Provides XDG Desktop Portal support for Sway containers. Installs the portal daemon, the wlroots-specific backend (xdg-desktop-portal-wlr), and the GTK fallback backend. Enables screen sharing, screenshots via portal API, and file dialogs for applications running inside the container.

require:
- dbus
- sway
- pipewire
env:
XDG_CURRENT_DESKTOP: "sway"
rpm:
packages:
- xdg-desktop-portal
- xdg-desktop-portal-wlr
- xdg-desktop-portal-gtk
- slurp
Property Value
Depends dbus, sway, pipewire
Packages xdg-desktop-portal, xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, slurp
Env XDG_CURRENT_DESKTOP=sway
Service None (D-Bus activation on demand)
Ports None
  1. D-Bus activation: Portal daemons start on-demand when an application calls a portal D-Bus method. No supervisord service needed.
  2. Sway config drop-in: Installs ~/.config/sway/config.d/portal.conf which runs dbus-update-activation-environment to export WAYLAND_DISPLAY, XDG_RUNTIME_DIR, XDG_CURRENT_DESKTOP, and SWAYSOCK to the D-Bus activation environment. Without this, portal daemons can’t find the Wayland display.
  3. Auto-approve config: Installs ~/.config/xdg-desktop-portal-wlr/config with chooser_type=none for headless automation (no user dialog for screen sharing).
Interface Backend Status
Screenshot xdg-desktop-portal-wlr Supported
ScreenCast (PipeWire) xdg-desktop-portal-wlr Supported
RemoteDesktop NOT supported on wlroots
File dialogs xdg-desktop-portal-gtk Supported (fallback)
Settings xdg-desktop-portal-gtk Supported (fallback)
  • sway-desktop metalayer (default for all desktop boxes)
  • /charly-image:layer — candy authoring reference (charly.yml schema, task verbs, service declarations)
  • /charly-check:check — declarative testing (check: block, charly check box, charly check live)