Skip to content

Linux Desktop

Use dbus2mqtt to interface with your Linux desktop

Pre-requisites:

  • Any Linux Desktop will do

Features

  • Desktop notifications (via org.freedesktop.Notifications)

Setup activities

Just run dbus2mqtt with the example configuration in this repository

uv run dbus2mqtt --config docs/examples/linux_desktop.yaml

Desktop notifications

Trigger a desktop notification by sending one of the following example payloads to dbus2mqtt/Notifications/command

Example notification with no timeout

{
  "method": "Notify",
  "args": [
    "dbus2mqtt",
    0,
    "dialog-information",
    "dbus2mqtt",
    "Message from <b><i>dbus2mqtt</i></b>",
    [],
    {},
    0
  ]
}

Example notification with actions and hints, that automatically disappears after 5 seconds

{
  "method": "Notify",
  "args": [
    "dbus2mqtt",
    0,
    "dialog-information",
    "dbus2mqtt",
    "Message from <b><i>dbus2mqtt</i></b>",
    ["ok", "OK", "cancel", "Cancel"],
    { "urgency": 1, "category": "device" },
    5000
  ]
}

Further references: