Skip to content

Commit

Permalink
Add more information for unmanaged extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
bbhtt committed Dec 6, 2023
1 parent 0b39395 commit 413b7b1
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions docs/extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,12 @@ stores. This is a typical example of an extension appdata.
Unmanaged Flatpak extensions
----------------------------

Flatpak also supports `unmanaged extensions`, allowing loading extensions
installed externally into ``/var/lib/flatpak/extension`` and
Flatpak also supports `unmanaged extensions`, allowing loading extensions
installed externally into ``/var/lib/flatpak/extension`` and
``$XDG_DATA_HOME/flatpak/extension``. This can be useful to expose
administrator policies, extensions etc. to Flatpak applications.
The extension point of unmanaged extensions look no different than
their regular counterparts.

An example of an unmanaged extension can be found in browsers such as
`Chromium <https://github.com/flathub/org.chromium.Chromium/blob/dc7f731e7b62199a00bfa3ea3d123ff6d16936dc/org.chromium.Chromium.yaml>`_
Expand Down Expand Up @@ -397,12 +399,22 @@ The Firefox snippet translates to:
cleanup-commands:
- mkdir -p ${FLATPAK_DEST}/etc/firefox
Now the required policy files for Firefox ``pref`` and
``policies.json`` can be placed in ``/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/x86_64/stable/defaults/pref``
Now the required policy files for Firefox ``pref`` and ``policies.json``
can be placed in ``/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/x86_64/stable/defaults/pref``
and ``/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/x86_64/stable/policies/policies.json``
respectively.
respectively on host. These would appear under
``/app/etc/firefox/policies/policies.json`` and
``/app/etc/firefox/defaults/pref`` inside the sandbox.

For Chromium, please look at the `readme <https://github.com/flathub/org.chromium.Chromium>`_.
Flatpak will only make the drop-ins under those locations available
inside the sandbox, the application also needs to support reading them.

For example Firefox `supports <https://hg.mozilla.org/mozilla-central/file/23ee4ac2d048de0aac3fa27ce7eb0925c1903096/xpcom/io/SpecialSystemDirectory.cpp#l198>`_
reading policies from ``/app/etc`` when run under Flatpak and Chromium
on Flathub carries patches.

For details on Chromium, please look at the
`readme <https://github.com/flathub/org.chromium.Chromium>`_.

.. note::

Expand Down

0 comments on commit 413b7b1

Please sign in to comment.