-
Notifications
You must be signed in to change notification settings - Fork 61
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 #246
Comments
Could you try this checklist and report the results? |
You need to install xdg-desktop-portal-gtk too. |
Good day! @smlx thanks for the suggestion! I've gone through the checklist a few times before, and I went through it again just now. Screen sharing through either webRTC (tested on firefox) or OBS works perfectly. But screenshot still doesn't work. All the systemd user units are active, running, and enabled as described in the checklist, and all the environment variables are set as they should. $ < "/proc/$(pidof xdg-desktop-portal)/environ" tr '\0' '\n' | grep '^WAYLAND_DISPLAY='
WAYLAND_DISPLAY=wayland-1
$ < "/proc/$(pidof xdg-desktop-portal)/environ" tr '\0' '\n' | grep '^XDG_CURRENT_DESKTOP='
XDG_CURRENT_DESKTOP=sway My wrapper script for running sway (or hyprland)#!/bin/bash
# Wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export SDL_VIDEODRIVER=wayland
export MOZ_ENABLE_WAYLAND=1
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=sway
export XDG_CURRENT_DESKTOP=sway
export GDK_BACKEND='wayland,x11'
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_QPA_PLATFORM='wayland;xcb'
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
# GTK themes
export GTK_THEME=Kanagawa-Borderless
export GTK_ICON_THEME=Everforest-Dark
export XCURSOR_THEME=phinger-cursors
export XCURSOR_SIZE=32
exec sway It may be worth mentioning that I'm testing the setup with solely Intel iGPU, so that hopefully eliminates all the Nvidia-related nonsense. @IlyaMZP, thanks! I know it will work if xdg-desktop-portal-gtk, xdg-desktop-portal-kde, or other backends are installed, flameshot-org/flameshot#2959 (comment) also mentioned something similar, but I'm not sure why they are required. I'm not really familiar with the code. And if they are required, should they be a dependency of xdg-desktop-portal-wlr? |
I'm not sure either, but that is what finally made it work for me. You need a way to give an application the permission to take a screenshot, and that permission prompt is part of xdg-desktop-portal-gtk. Maybe there is a way to make it work without xdg-desktop-portal-gtk, but I haven't been able to find one. |
So with the updated interface that can request permission, because xdg-desktop-portal-wlr doesn't have a way to ask permission, xdg-desktop-portal instead (possibly) delegates that to the other backends? I see this in the 1.15.0 release notes for xdg-desktop-portal:
I am unable to locate where such an option is set in any of the portal backends, though, but from what I can observe, it could be relevant to this issue (using solely xdg-desktop-portal-wlr). |
With xdg-dektop-portal-gtk installed, I still have issues. I could have screenshoot once only, and then I get this in my logs:
Apparently, it fails to detect the correct interface to ask for permissions. I tried restarting xdg-desktop-portal xdg-desktop-portal-wlr xdg-desktop-portal-gtk Apparently, it does not detect the installed gtk portal |
Investigating again and I find back my comment :) I could make |
I confirm that upgrading |
I had the same problem, but after I also installed |
Installing xdg-desktop-portal-gtk does solve the issue but it makes my wonder why? Since either way we specify wlr in sway-portals.conf as in: org.freedesktop.impl.portal.Screenshot=wlr what does GTK have to do with any of it? I investigated a bit and without gtk, the Screenshot portal doesn't get "turned on/used" based on input from |
DBus says "No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop" while taking screenshots through xdg-desktop-portal-wlr.
My setup
More description
Essentially it's the same issue as flatpak/xdg-desktop-portal#861 (the exact same situation and output), where it's mentioned that c83b3cc should fix the problem, but it seems the issue still exists, both in sway and Hyprland. The same issue also occurred in Wayfire, according to flameshot-org/flameshot#2959 (comment).
Steps to reproduce
flameshot gui
or the test script.Related issues:
The text was updated successfully, but these errors were encountered: