Skip to content

Commit 95f7ff4

Browse files
committed
debugging: Add a section on logging bus traffic
1 parent 241987a commit 95f7ff4

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

docs/debugging.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,20 @@ You can see all the apps that are currently running in Flatpak sandboxes
173173
And, if you need to, you can terminate one by force (since 1.2)::
174174

175175
$ flatpak kill <application-id>
176+
177+
Audit session or system bus traffic
178+
-----------------------------------
179+
180+
A ``--socket=session-bus`` or a ``--socket=system-bus`` permission must
181+
not be present for the logging to work.
182+
183+
Session or system bus traffic can be audited by passing ``--log-session-bus``
184+
and ``--log-system-bus`` respectively to ``flatpak run``::
185+
186+
flatpak run --log-session-bus <application-id>
187+
188+
This can be useful to figure out the bus names used by an application
189+
and the corresponding ``--talk-name`` or ``--own-name`` permissions
190+
required::
191+
192+
flatpak --log-session-bus run <application-id>| grep '(required 1)'

docs/sandbox-permissions.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ risk. So they must be avoided, unless the application is a development
121121
tool.
122122

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

126127
**Ownership**
127128

0 commit comments

Comments
 (0)