xdg-open and file:// URI handling

Alexander Larsson alexl at redhat.com
Thu Apr 7 07:36:37 UTC 2016


On ons, 2016-04-06 at 18:37 -0700, Cosimo Cecchi wrote:
> On Wed, Apr 6, 2016 at 11:30 AM, Robert McQueen <robert at endlessm.com>
> wrote:
> > Anyway - this class of problem applies to any app with a mime type
> > binding, so it is used by xdg-open or GIO file:// URI handling etc.
> > I think we would need something like an xdg-app-open which
> > understands/recognises file paths in the command line argument, and
> > maps them in to the sandbox using the document portal in some kind
> > of transient / one-shot kind of way, before handing the transformed
> > path/URI into the app.
> > 
> > Then I guess we need to put that in the .desktop files for those
> > apps which use the document portal and care to access local files
> > handed in at launch time in this way.
> > 
> > Any thoughts?
> That's not the only thing that we would need though; a related
> problem is when an application wants to launch another one (e.g.
> through g_app_info_launch_uris(), or gtk_show_uri()). In that case, I
> believe GIO running in the sandbox will not have access to e.g.
> /usr/share/applications to enumerate all the apps that are available
> for the mimetype, and will fail to launch.
> One rather easy solution would be to map the desktop files in the
> sandbox, e.g. somewhere under /run/, but I'm not sure if that's what
> we want.
> Another approach would require patching GIO to call out to a "launch
> app" portal outside of the sandbox?

Yeah, this is the canonical case where we want a portal. Creating such
a portal is on my TODO list, but i never seem to be able to get to the
portal work, there keep being other stuff that has to be fixed. :)

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's a leather-clad sweet-toothed paranormal investigator on the edge. 
She's a green-fingered Buddhist widow in the witness protection program. 
They fight crime! 





More information about the xdg-app mailing list