Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop #861

Closed
smoak opened this issue Aug 15, 2022 · 3 comments

Comments

@smoak
Copy link

smoak commented Aug 15, 2022

xdg-desktop-portal version 1.15.0 seems to say there is no Screenshot interface?

More details:

OS: Arch Linux (Linux 2TKZ9K3 5.15.60-1-lts #1 SMP Thu, 11 Aug 2022 14:09:59 +0000 x86_64 GNU/Linux)

  • xdg-desktop-portal - 1.15.0-1
  • xdg-desktop-portal-wlr - 0.6.0-1
  • grim - 1.4.0-2
  • sway - 1:1.7-9

Attempting to use the test script to trigger a screenshot gives me a dbus error:

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop

I execute sway like:

#!/bin/bash
export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export QT_QPA_PLATFORM=wayland
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway
exec sway

And in my sway config:

exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
     dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK

Running xdg-desktop-portal in verbose mode suggests that Screenshot is implemented though:

$ /usr/lib/xdg-desktop-portal --replace --verbose
XDP: load portals from /usr/share/xdg-desktop-portal/portals
XDP: loading /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal
XDP: portal implementation for gnome
XDP: portal implementation supports org.freedesktop.impl.portal.Secret
XDP: loading /usr/share/xdg-desktop-portal/portals/wlr.portal
XDP: portal implementation for wlroots, sway, Wayfire, river, phosh
XDP: portal implementation supports org.freedesktop.impl.portal.Screenshot
XDP: portal implementation supports org.freedesktop.impl.portal.ScreenCast
XDP: providing portal org.freedesktop.portal.MemoryMonitor
XDP: providing portal org.freedesktop.portal.PowerProfileMonitor
XDP: providing portal org.freedesktop.portal.NetworkMonitor
XDP: providing portal org.freedesktop.portal.ProxyResolver
XDP: providing portal org.freedesktop.portal.Trash
XDP: providing portal org.freedesktop.portal.GameMode
XDP: providing portal org.freedesktop.portal.Realtime

(/usr/lib/xdg-desktop-portal:72505): xdg-desktop-portal-WARNING **: 15:46:22.466: No skeleton to export
XDP: Using wlr.portal for org.freedesktop.impl.portal.Screenshot in sway
XDP: Falling back to gnome-keyring.portal for org.freedesktop.impl.portal.Secret
XDP: providing portal org.freedesktop.portal.Secret
XDP: Using wlr.portal for org.freedesktop.impl.portal.ScreenCast in sway
XDP: providing portal org.freedesktop.portal.ScreenCast
XDP: org.freedesktop.portal.Desktop acquired
@smoak
Copy link
Author

smoak commented Aug 15, 2022

Downgrading xdg-desktop-portal (1.15.0-1 => 1.14.6-1) works with no issues.

@GeorgesStavracas
Copy link
Member

(/usr/lib/xdg-desktop-portal:72505): xdg-desktop-portal-WARNING **: 15:46:22.466: No skeleton to export

The only way this error can happen is if the implementation D-Bus proxy fails to be created. I can confirm it works on xdg-desktop-portal-gnome, and xdg-desktop-portal-gtk, but I don't know if -kde and -wlr do something different that could be incompatible with the latest changes.

Since you seem to be using the -wlr implementation, consider reporting this to https://github.com/emersion/xdg-desktop-portal-wlr/

@GeorgesStavracas
Copy link
Member

GeorgesStavracas commented Sep 15, 2022

I think this is a particularity of xdg-desktop-portal-wlr which fails to export the interface in the absence of the D-Bus property, so closing since emersion/xdg-desktop-portal-wlr@c83b3cc landed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants