pop-os / xdg-desktop-portal-cosmic

GNU General Public License v3.0
35 stars 30 forks source link

Screenshot issue with ksnip #2

Closed yochananmarqos closed 1 year ago

yochananmarqos commented 1 year ago

I just built cosmic-epoch from https://github.com/pop-os/cosmic-epoch/commit/277cf9e3f1e810d8c66a16bb6b21cc102e0f400f and followed the screenshot instructions. However, ksnip isn't playing nice:

❯ ksnip -t
Critical: Unknown wayland platform, using default wayland Image Grabber.
Warning: Unable to find any translation files for ksnip.
Warning: Unable to find any translation files for kImageAnnotator.
Warning: Unsupported Capture Mode selected, falling back to full screen.
Critical: Error: No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop

ksnip 1.10.0-1 qt5-wayland 5.15.8+kde+r60-1

❯ pacman -Fx org.freedesktop.portal.Screenshot
extra/xdg-desktop-portal 1.16.0-1 [installed]
    usr/share/dbus-1/interfaces/org.freedesktop.portal.Screenshot.xml
Drakulix commented 1 year ago

Critical: Error: No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop

This looks more like the portal is not running on your system. A possible reason could be, that the portal is crashing on startup. If that is the case, you might be able to get some logs by running journalctl --user _EXE=/usr/libexec/xdg-desktop-portal-cosmic.

Another possible reason is, that the portal simply wasn't started. Given we only added the portal to our session autostart a couple of weeks ago and this issue is already two weeks old (sorry!), you maybe simply need to update to get the latest cosmic-session package for this to start working.

If the issue persists, please try to start the cosmic-portal manually in a terminal, restart the generic-portal and try ksnip again. If that works something is broken with starting up the portal, if it doesn't please attach the output of all three commands:

/usr/libexec/xdg-desktop-portal-cosmic &
systemctl --user restart xdg-desktop-portal;
ksnip -t
Drakulix commented 1 year ago

❯ pacman -Fx org.freedesktop.portal.Screenshot

I just saw, that you are likely running archlinux given the pacman output and are not our deb-files for pop-os. It may very well be, that the cosmic-session submodule in cosmic-epoch is simply too old to contain the necessary commit to start the portal. I will check later today.

yochananmarqos commented 1 year ago

It's working now with https://github.com/pop-os/cosmic-epoch/commit/f0b63f7286cffb1445873860ed9cecaf2b569988. :+1: