Skip to content

Commit

Permalink
debugging: Add a section on logging bus traffic
Browse files Browse the repository at this point in the history
  • Loading branch information
bbhtt committed Dec 3, 2024
1 parent 241987a commit ec3c189
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions docs/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,20 @@ You can see all the apps that are currently running in Flatpak sandboxes
And, if you need to, you can terminate one by force (since 1.2)::

$ flatpak kill <application-id>

Audit session or system bus traffic
-----------------------------------

A ``--socket=session-bus`` or a ``--socket=system-bus`` permission must
not be present for the logging to work.

Session or system bus traffic can be audited by passing ``--log-session-bus``
and ``--log-system-bus`` respectively to ``flatpak run``::

flatpak run --log-session-bus <application-id>

This can be useful to figure out the bus names used by an application
and the corresponding ``--talk-name`` or ``--own-name`` permissions
required::

flatpak --log-session-bus run <application-id>| grep '(required 1)'
3 changes: 2 additions & 1 deletion docs/sandbox-permissions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ risk. So they must be avoided, unless the application is a development
tool.

``flatpak run --log-session-bus $FLATPAK_ID`` can be used to find the specific
D-Bus permissions needed.
D-Bus permissions needed. See :ref:`debugging:Audit session or system bus traffic`
for more information.

**Ownership**

Expand Down

0 comments on commit ec3c189

Please sign in to comment.