<div dir="ltr">I finally got it working. I can now complete my application. You guys are quick. My friends expected this to take weeks.<div>Huge supporter and daily driver of KDE, and as part of my capstone project in college, I am making a ML based kirigami app(which is why I needed screenshots). </div><div>Cannot thank you guys enough.</div><div><br></div><div>Thanks a lot,</div><div>Rahul</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 5 Oct 2024 at 02:33, Aleix Pol <<a href="mailto:aleixpol@kde.org">aleixpol@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">The path in Exec= needs to be absolute for KWin to validate it.<br>
<br>
On Fri, Oct 4, 2024 at 6:02 PM rahul vadhyar <<a href="mailto:vadhyarrahul@gmail.com" target="_blank">vadhyarrahul@gmail.com</a>> wrote:<br>
><br>
> After trying copying code in xdg-desktop-portal-kde, I am now presented with<br>
> The process is not authorized to take a screenshot<br>
><br>
> From my research(<a href="https://phabricator.kde.org/D29407" rel="noreferrer" target="_blank">https://phabricator.kde.org/D29407</a>, <a href="https://forum.kde.org/viewtopic.php%3Ff=305&t=176422.html" rel="noreferrer" target="_blank">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>
><br>
> I am providing my .desktop file as reference if that helps.<br>
> [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>
><br>
> Sorry for asking every small thing, I am new to this, and the lack of documentation around this leaves me no option.<br>
> Please help me solve this (hopefully) final error.<br>
><br>
> A very heartfelt thanks for your support,<br>
> Rahul<br>
><br>
> On Fri, 4 Oct 2024 at 20:20, Vlad Zahorodnii <<a href="mailto:vlad.zahorodnii@kde.org" target="_blank">vlad.zahorodnii@kde.org</a>> wrote:<br>
>><br>
>> 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>