MCPcopy Index your code
hub / github.com/emersion/xdg-desktop-portal-wlr

github.com/emersion/xdg-desktop-portal-wlr @v0.8.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.8.3 ↗ · + Follow
423 symbols 896 edges 31 files 1 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

xdg-desktop-portal-wlr

xdg-desktop-portal backend for wlroots.

Currently it only implements the following portals only and is meant to offload the missing portals to other implementations depending on the user preferences.

  • org.freedesktop.impl.portal.Screenshot
  • org.freedesktop.impl.portal.ScreenCast

Other portals that can be used include gtk for many implementations, gnome-keyring for the Secret portal.

Building

meson build
ninja -C build

Installing

From Source

ninja -C build install

Distro Packages

Packaging status

Running

Make sure XDG_CURRENT_DESKTOP is set. Make sure WAYLAND_DISPLAY and XDG_CURRENT_DESKTOP are imported into D-Bus. If you're running Sway, this can be added to your config file:

exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway

When correctly installed, xdg-desktop-portal should automatically invoke xdg-desktop-portal-wlr when needed.

Recent changes to xdg-desktop-portal is requiring desktop environments to set up a *-portals.conf configuration that specify which portals should be used for a given XDG_CURRENT_DESKTOP value. If this file does not exists in /usr/share/xdg-desktop-portal/, you should create it under ~/.config/xdg-desktop-portal/ with content like this:

[preferred]
default=gtk
org.freedesktop.impl.portal.Screenshot=wlr
org.freedesktop.impl.portal.ScreenCast=wlr

(you can specify the default portal to use for any implementation not explicitly defined, and you can add any portal you need for other specific interfaces like gnome-keyring for the Secret portal).

Configuration

See man 5 xdg-desktop-portal-wlr.

Manual startup

At the moment, some command line flags are available for development and testing. If you need to use one of these flags, you can start an instance of xdpw using the following command:

xdg-desktop-portal-wlr -r [OPTION...]

To list the available options, you can run xdg-desktop-portal-wlr --help.

FAQ

Check out or FAQ for answers to commonly asked questions.

Please see the screencast compatibility guide for more information on compatible applications and how to get them working.

If you have a question or problem that is not mentioned in those documents, please open an issue or come chat with us in #sway on Libera Chat.

Contributing

If you're interested in testing or development, check out CONTRIBUTING.md for more information.

License

MIT

Core symbols most depended-on inside this repo

logprint
called by 255
src/core/logger.c
xdpw_screencast_instance_destroy
called by 9
src/screencast/screencast.c
xdpw_buffer_destroy
called by 8
src/screencast/screencast_common.c
add_pod
called by 7
src/screencast/pipewire_screencast.c
xdpw_pwr_enqueue_buffer
called by 7
src/screencast/pipewire_screencast.c
wlr_frame_finish
called by 6
src/screencast/wlr_screencopy.c
parse_string
called by 5
src/core/config.c
xdpw_gbm_device_create
called by 5
src/screencast/screencast_common.c

Shape

Class 221
Function 174
Enum 28

Languages

C73%
C++27%

Modules by API surface

include/screencast_common.h76 symbols
src/screencast/wlr_screencast.c67 symbols
src/screencast/pipewire_screencast.c48 symbols
src/screencast/screencast_common.c38 symbols
src/screencast/ext_image_copy.c27 symbols
src/screencast/wlr_screencopy.c21 symbols
src/screencast/screencast.c19 symbols
src/screencast/chooser.c16 symbols
src/core/config.c15 symbols
include/xdpw.h15 symbols
src/core/main.c12 symbols
src/screenshot/screenshot.c10 symbols

For agents

$ claude mcp add xdg-desktop-portal-wlr \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page