Skip to main content

Inspect the D-Bus messages a program sends and receives

Project description

dbus-trace is a wrapper to see what D-Bus messages a program sends and receives.

Installation:

pip install dbus-trace

Usage:

dbus-trace <command>
# For example - notify-send creates a desktop notification using D-Bus
$ dbus-trace notify-send "Hello world"

* Connected to session bus (connection 0)
◀ method_call: Hello [serial = 1]
  path = /org/freedesktop/DBus
  interface = org.freedesktop.DBus
  destination = org.freedesktop.DBus

...

◀ method_call: Notify [serial = 7]
  path = /org/freedesktop/Notifications
  interface = org.freedesktop.Notifications
  destination = :1.44
  Data (susssasa{sv}i): (
       'notify-send',
       0,
       '',
       'Hello world',
       '',
       [],
       {'sender-pid': ('x', 31559), 'urgency': ('y', 1)},
       -1,
    )

▷ method_return:  [serial = 88]
  Flags: 1 (no_reply_expected)
  destination = :1.944
  reply_serial = 7
  sender = :1.44
  Data (u): (8,)

...

dbus-trace listens on Unix sockets for the system bus and the session bus, and passes through any data sent to these sockets to the real buses. It runs the child program with environment variables pointing it to use these proxy sockets, and of course it decodes what’s going through and prints it to the terminal.

For more background about D-Bus, see What is D-Bus?.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbus_trace-0.1.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

dbus_trace-0.1-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page