Products › lamco-dbus-tools › Interfaces

org.freedesktop.DBus.Properties: Get, Set and PropertiesChanged

org.freedesktop.DBus.Properties is how D-Bus services expose state through Get, Set, GetAll and PropertiesChanged, which lamco-dbus-tools records and sets.

D-Bus interface org.freedesktop.DBus.Properties

org.freedesktop.DBus.Properties is the standard interface through which a D-Bus service exposes state as named values: A lamp's brightness, a network's state, a player's volume. Clients read them with Get and GetAll, change them with Set, and hear of changes through the PropertiesChanged signal. Almost every desktop service has properties, so almost every recording holds these calls. lamco-dbus-tools records them like any other message, sets a property on purpose with every act timed, and catches a property whose type, access or change signal moved between versions.

What it is

The specification defines three methods and one signal:

  • Get(s interface_name, s property_name) returns a VARIANT.
  • Set(s interface_name, s property_name, v value) returns nothing.
  • GetAll(s interface_name) returns a dictionary of names to variants. An interface with no properties gives an empty dictionary, and properties the caller may not see are left out silently.
  • PropertiesChanged(s interface_name, a{sv} changed_properties, as invalidated_properties): The changed values, and the names of properties that changed without their new values being sent.

Names are conventionally CamelCase, like member names. An empty interface name is allowed, and where two interfaces on one object have a property of the same name, the result is undefined. A Get of a property the caller may not read should return an access error.

Which properties exist, their types and whether each is writable come from the introspection XML. So does whether a change is signalled: The org.freedesktop.DBus.Property.EmitsChangedSignal annotation, on the property or its interface, is true (the default, with the value sent), invalidates (the name only), const (never changes) or false (changes aren't signalled). A client that waits for PropertiesChanged on a property that stops emitting it never hears of a change.

Policy can be finer than the interface. A bus policy rule can allow Get and refuse Set by member, and a service may check permission on each Set itself, through polkit.

Errors you'll meet

  • org.freedesktop.DBus.Error.InvalidArgs: The value's type doesn't match the property's, or the arguments don't match ssv. One recorded text from a changed signature: Error: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Type of message, “(s)”, does not match expected type “(su)”.
  • org.freedesktop.DBus.Error.UnknownMethod: The object doesn't implement the method called.

How lamco-dbus-tools reads it

dbussee record records Get, Set, GetAll and PropertiesChanged as they cross the bus. Bodies are kept as their length unless --bodies asks for more, since a value can be a secret. dbusdo set calls org.freedesktop.DBus.Properties.Set, recorded as an act with its timing at the caller, and fails when the service answers with an error. dbustell has no reading of its own for properties. dbustell drift, reading two introspection descriptions, catches a removed property, a changed type, a narrowed access and a changed EmitsChangedSignal.

dbussee watch --match "type='signal',member='PropertiesChanged'" --bodies decoded   # each change as it's signalled
dbusdo set com.example.Lamp /com/example/Lamp com.example.Lamp.Brightness u 7   # Properties.Set, timed at the caller
dbusdo call com.example.Lamp /com/example/Lamp org.freedesktop.DBus.Properties.Get ss com.example.Lamp Brightness   # read it back
dbustell drift old.xml new.xml                                                   # a property's type, access or signal changed

Where it has been run

The README's run record doesn't list a run of dbusdo set on its own, so it doesn't cover setting a property. It lists interface drift across systemd 257 on Debian 13 and 262 on Fedora 45, which compared the properties of hostname1, timedate1, locale1 and login1 with the rest of their interfaces on 2026-11-30: 14 changes, none breaking. The recordings of real desktops listed there, on Debian 13 with Xfce and on RHEL 10 with GNOME 49, hold whatever property traffic crossed those buses, and the record doesn't count it.

Findings

  • DRIFT-004: A property was removed.
  • DRIFT-006: A property's type changed.
  • DRIFT-007: A property's access was narrowed or changed.
  • DRIFT-009: A property's change signal changed in a way old clients rely on.

Related