<div dir="ltr">After trying copying code in xdg-desktop-portal-kde, I am now presented with <div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">The process is not authorized to take a screensh</span>ot<br></span></div><div><br></div><div> From my research(<a href="https://phabricator.kde.org/D29407">https://phabricator.kde.org/D29407</a>, <a href="https://forum.kde.org/viewtopic.php%3Ff=305&t=176422.html">https://forum.kde.org/viewtopic.php%3Ff=305&t=176422.html</a>), it should have been fixed by putting the app in a root write only dir. But even after putting the app in /usr/bin and the .desktop file in /usr/share/applications, I still cannot get rid of this error.<br></div><div><br></div><div>I am providing my .desktop file as reference if that helps. </div><div>[Desktop Entry]<br>Name=Kool Intelligence<br>Exec=koolintelligence<br>Icon=kde<br>Type=Application<br>Terminal=false<br>Categories=System<br>X-DBUS-ServiceName=org.kde.koolintelligence<br>X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot,org.kde.KWin.ScreenShot2<br></div><div><br></div><div>Sorry for asking every small thing, I am new to this, and the lack of documentation around this leaves me no option.</div><div>Please help me solve this (hopefully) final error.</div><div><br></div><div>A very heartfelt thanks for your support,</div><div>Rahul</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 4 Oct 2024 at 20:20, Vlad Zahorodnii <<a href="mailto:vlad.zahorodnii@kde.org">vlad.zahorodnii@kde.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/4/24 5:28 PM, rahul vadhyar wrote:<br>
> Even if CaptureWorkspace returns a dictionary, I shouldn't be getting <br>
> the error that the API doesn't exist.<br>
<br>
I think that the error message is rather misleading. CaptureWorkspace <br>
expects some input arguments, but the example code provides none so <br>
QtDBus says that there's no CaptureWorkspace **with the specified** <br>
signature.<br>
<br>
CaptureWorkspace expects two arguments: a dictionary with various <br>
options (it can be empty), and a pipe file descriptor where kwin will <br>
write screenshot to. A good example how to use that API is spectacle or <br>
xdg-desktop-portal-kde <br>
<a href="https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/30b9ac6a169ee9f7c36aabbec4038a8a715ac2cb/src/screenshotdialog.cpp#L158" rel="noreferrer" target="_blank">https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/30b9ac6a169ee9f7c36aabbec4038a8a715ac2cb/src/screenshotdialog.cpp#L158</a><br>
<br>
> To provide more context, I am making a kirigami app. I am using the <br>
> .desktop file as given in the previous email. I am also using the <br>
> following command for compiling and testing<br>
</blockquote></div>