Opening a browser
Robert Munteanu
robert.munteanu at gmail.com
Wed Jul 20 13:55:39 UTC 2016
On Wed, Jul 20, 2016 at 4:45 PM, Bastien Nocera <hadess at hadess.net> wrote:
> On Wed, 2016-07-20 at 16:41 +0300, Robert Munteanu wrote:
>> Hi,
>>
>> I'm almost done with wrapping Brackets, a code editor , [1] using
>> flatpak.
>>
>> The remaining major issue is allowing the application to open a
>> browser - typically Chrome or Chromium. This is a key feature of
>> Brackets, allowing the user to see changes in the browser as soon as
>> any code is changed in the editor.
>>
>> However, that does not work at all, and I've seen some references
>> that
>> this is restricted by default.
>>
>> How can I configure the packed application to allow browser access?
>
> You'll need to a bit clearer as to what you mean by "allow browser
> access".
>
> - Do you pass a URI that's inside the sandbox?
I am not sure :-), but the workflow is that the user edits files on
the filesystem and they are rendered in the browser instance opened by
the program.
I already use
"--filesystem=host"
to allow filesystem access
> - Do you pass a URI and the browser needs to access multiple related
> files (say, JS files in the same directory)?
Yes
> - Do you pass an external URI?
IIRC it's a localhost URI being served by a NodeJS instance started by
the application.
> - How does it pass that URI?
I am not sure; I can't launch it without flatpak on my system - the
reason why I'm trying to package it :-)
I assume it launches a new chrome process and passes the address as a
command-line argument.
> - Does it control the browser through other means?
According to [2] it launches chrome with a custom profile and injects
javascript code in the page. I assume that it's used for bidirectional
communication with the editor which allows the 'live preview'
functionality to work.
Thanks,
Robert
[2]: https://github.com/adobe/brackets/wiki/How-to-Use-Brackets
--
http://robert.muntea.nu/
More information about the xdg-app
mailing list