Bug 15425 - Make the 'loaded' desktop dbus signal unracey
Summary: Make the 'loaded' desktop dbus signal unracey
Status: NEW
Alias: None
Product: Matchbox
Classification: Yocto Project Subprojects
Component: matchbox (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: Future
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-03-07 12:13 UTC by Ross Burton
Modified: 2026-10-28 11:51 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2024-03-07 12:13:01 UTC
Currently the desktop will emit a 'loaded' signal over dbus when its loaded, and other pieces may use dbus-wait to wait for the desktop to be loaded before doing more. Currently the keyboard does this.

It would also make sense for the runtime image testing to watch for the signal to say that the desktop is close enough to being usable.

However, as this is a one-time signal there's a huge race condition: what if the signal is fired before it is watched for?

The solution to this would be for the desktop to take ownership of org.matchbox.Desktop or similar on the bus. This can be checked at any time, and signals sent when it is acquired, so can be race-free.

For example: https://docs.gtk.org/gio/migrating-gdbus.html#owning-bus-names
Comment 1 Ross Burton 2024-03-07 12:13:38 UTC
It would be sensible to change dbus-wait to support both waiting for a signal or checking if a name exists.