I’m trying to take a screenshot under Wayland via org.freedesktop.portal.Screenshot but all I get is: “The name org.freedesktop.portal.Screenshot was not provided by any .service files”.
org.freedesktop.portal.Screenshot is the interface, not the bus name. All xdg-desktop-portals portals are exported under org.freedesktop.portal.Desktop.
I’m aware of the documentation but can’t say that it really helped me here, otherwise I wouldn’t be asking around the forum for help.
For Example, the options parameter of the Screenshot method has format a{sv}, I didn’t find any clue what this is supposed to be. Is this an array of string value pairs? Is it mandatory? Is there any working example usage?
Your questions are rather DBus specific. a {sv} means it’s hashmap of string keys & a value that could be of any type. You can check https://github.com/flatpak/libportal which provides wrappers around the DBus calls.
I’d say that you want QVariantMap , but that’s the guess of a GNOME developer
I think that this is a good guess, found that too after @bilelmoussaoui told me that this is a general DBus thing and I “refined” my Internet search. Will test it later when I’m home.
The response seems to be a Request /org/freedesktop/portal/desktop/request/1_181/t, how can I get notified about the user clicking “share”, the dialog closing and fetching the screenshot?