xdg-open and file:// URI handling

Robert McQueen robert at endlessm.com
Wed Apr 6 18:30:10 UTC 2016


Hi list,

We touched on this in the GNOME Software hackfest, and there was an 
internal discussion at Endless about a similar topic so I thought I'd 
start a thread here and join the discussions.

I noticed with a GEdit xdg-app installed that when other stuff (eg 
Firefox, File-Roller, etc) launches gedit to view eg a 
downloaded/extracted file which is somewhere in /tmp or /run, gedit 
opens with an empty window because it can't actually open the file it 
was given on the command line.

(This isn't the case with Builder but it has full filesystem access 
which is craaazy, have you folks _met_ Christian?! ;)

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?

Thanks,
Rob

........................................................................

Robert McQueen  |  +1.415.413.4159  |  Endless <http://endlessm.com/>



More information about the xdg-app mailing list