elementary / contractor

A desktop-wide extension service used by elementary OS
https://elementary.io
GNU General Public License v3.0
31 stars 11 forks source link

Document how to provide contracts from flatpak apps #34

Open peteruithoven opened 3 years ago

peteruithoven commented 3 years ago

Problem

With the move to Flatpak current approaches of providing contracts no longer work.

Proposal

Document how to provide contracts from apps distributed through Flatpak.

Relevant: https://github.com/elementary/hig/pull/33

@Marukesu mentioned:

Well, they can, they only need to add --talk-name=org.elementary.Contractor to finish args. We can also add a portal to copy the sandboxed contract to the host path so they can be used on others apps.

peteruithoven commented 3 years ago

Some assumptions, talking to org.elementary.Contractor doesn't really make sense as you'd want to add the contracts even before they are run?

Copying a contract file only works for the current user as /usr is blacklisted by flatpak? But that actually makes sense as the flatpak is usually installed for the specific user anyway.

Is there a mechanism in Flatpak that would allow us to execute a command (to copy the file to the host system) on install and on uninstall (to remove the file)?

davidmhewitt commented 3 years ago

There isn't currently a mechanism to getting Contracts as they existed in 5.1 to work at all.

I believe the current plan is to work on expanding the XDG desktop file spec to allow Desktop Actions to take file/URI arguments. Then we don't need the contractor service at all, and it will be standards compliant to work on other DEs/distros.

peteruithoven commented 3 years ago

That sounds like an interesting alternative. Any idea where to follow that discussion? Or does that still need to start?