flathub / com.valvesoftware.Steam

https://flathub.org/apps/details/com.valvesoftware.Steam
337 stars 70 forks source link

Feature: Use DynamicLauncher to automatically install desktop files for extensions #1140

Open Vixea opened 10 months ago

Vixea commented 10 months ago

Using https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.DynamicLauncher It might be possible to have the steam flatpak automatically install desktop files for extensions.

This would allow users to easily launch apps(extensions) like:

https://github.com/sonic2kk/steamtinkerlaunch https://github.com/alvr-org/ALVR

nanonyme commented 10 months ago

@gasinvein raised a good question: why? Extensions can already install desktop entries.

Vixea commented 10 months ago

Huh @CharlieQLe says it isn't possible

Vixea commented 10 months ago

Could you please explain how(Charlie is the person who made the flatpak version of ALVR)

CharlieQLe commented 10 months ago

@gasinvein raised a good question: why? Extensions can already install desktop entries.

I've tried making it work, but it seems like unless the base app (in this case, Steam) has access to both the org.freedesktop.Flatpak DBus session and the appropriate desktop files directory, there's no way to install a desktop file cleanly (Using the aforementioned session and directory would allow us to install a desktop file directly on launch, but it's not quite as nice as using a portal imo).

SteamTinkerLaunch also has this problem, with this issue in particular. DynamicLauncher would be the appropriate solution here. I could try working on a PR for it, but it would be better to figure out where extensions should place their desktop files.

Ideally, the extension should be able to define where their desktop files can be placed via the manifest, similar to the original app. But that's an issue that should be opened on the flatpak repo, not here.

gasinvein commented 10 months ago

The DynamicLauncher portal is the right way forward here. Allowing access to ~/.local/share/applications is essentially a sandbox escape.

nanonyme commented 10 months ago

Afaik it's not just ideally but app extensions actually can.

Vixea commented 3 weeks ago

Is this still even possible with how this flatpak is setup now I don't see the same things as before?