ryonakano / pinit

Pin portable apps to the launcher
GNU General Public License v3.0
53 stars 10 forks source link

Use org.freedesktop.portal.DynamicLauncher instead of home rw access #189

Closed sandorex closed 1 month ago

sandorex commented 7 months ago

Is there any reason the app is not using the DynamicLauncher portal

I am one of the bit paranoid users so it would soothe me and possibly others as the app would probably lose the potentionally unsafe marking on flathub

ryonakano commented 7 months ago

Thank you for your info, I didn't know the existence of that API. I'll take a look at it.

ryonakano commented 6 months ago

Note to myself:

ryonakano commented 1 month ago

OK so after investigation I found we can't use these APIs, because these APIs aim to register desktop entries that runs on the caller application as written in the doc:

The DynamicLauncher portal allows sandboxed (or unsandboxed) applications to install launchers (.desktop files) which have an icon associated with them and which execute a command in the application.

which means the Exec line looks like this if you register gnome-software for example:

[Desktop Entry]
GenericName=Demo App
Comment=Demonstrate libportal dynamic launcher module
Categories=GTK;Utility;
Exec=flatpak run --command=gnome-software 'io.github.ryonakano.portal-dynamic-launcher-demo'
Type=Application
Name=Portal Dynamic Launcher Demo
Icon=/home/ryo/.local/share/xdg-desktop-portal/icons/scalable/io.github.ryonakano.portal-dynamic-launcher-demo.example.svg
TryExec=/home/ryo/.local/share/flatpak/exports/bin/io.github.ryonakano.portal-dynamic-launcher-demo
X-Flatpak=io.github.ryonakano.portal-dynamic-launcher-demo

We want to handle independent desktop entries in Pin It!, so these APIs are not for our usage. Closing as "Won't Fix", but thank you for your idea anyways :+1: