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”Overview
Section titled “Overview”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.
Candy Definition
Section titled “Candy Definition”require: - dbus - sway - pipewire
env: XDG_CURRENT_DESKTOP: "sway"
rpm: packages: - xdg-desktop-portal - xdg-desktop-portal-wlr - xdg-desktop-portal-gtk - slurpKey Properties
Section titled “Key Properties”| 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 |
How It Works
Section titled “How It Works”- D-Bus activation: Portal daemons start on-demand when an application calls a portal D-Bus method. No supervisord service needed.
- Sway config drop-in: Installs
~/.config/sway/config.d/portal.confwhich runsdbus-update-activation-environmentto exportWAYLAND_DISPLAY,XDG_RUNTIME_DIR,XDG_CURRENT_DESKTOP, andSWAYSOCKto the D-Bus activation environment. Without this, portal daemons can’t find the Wayland display. - Auto-approve config: Installs
~/.config/xdg-desktop-portal-wlr/configwithchooser_type=nonefor headless automation (no user dialog for screen sharing).
Portal Capabilities
Section titled “Portal Capabilities”| 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) |
Included In
Section titled “Included In”sway-desktopmetalayer (default for all desktop boxes)
Used In Boxes
Section titled “Used In Boxes”/charly-selkies:sway-browser-vnc(viasway-desktopmetalayer)
Cross-References
Section titled “Cross-References”/charly-selkies:sway-desktop— Desktop metalayer that includes this candy/charly-infrastructure:dbus-layer— D-Bus session bus (required dependency)/charly-selkies:pipewire— PipeWire (required for ScreenCast)/charly-selkies:sway— Sway compositor (required)
Related
Section titled “Related”/charly-image:layer— candy authoring reference (charly.ymlschema, task verbs, service declarations)/charly-check:check— declarative testing (check:block,charly check box,charly check live)