Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Improvements

- daemon: Fix UI service failing to launch when started manually instead of via D-Bus activation.
- daemon: Allow Firefox to contact daemon on more distros with different app IDs (Thank you, @michaelbeaumont!)
- ui: Add Bulgarian translation (Thank you, @salif!)
- webext: Try to read app ID from associated desktop entry (Thank you, @michaelbeaumont!)
Expand Down
20 changes: 14 additions & 6 deletions credentialsd/src/dbus/ui_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,20 @@ impl UiController for UiControlServiceClient {
// events according to the sender.
// Therefore, we call `start_service_by_name()` explicitly, then subscribe, then
// issue the function call.
let service_name = WellKnownName::try_from(backend_proxy.as_ref().destination().clone())
.expect("UiControl destination is a well-known name");
dbus_proxy.start_service_by_name(service_name, 0).await?;
let sender = dbus_proxy
.get_name_owner(backend_proxy.as_ref().destination().clone())
.await?;
// Only activate the service if it isn't already running: bus implementations
// reject `StartServiceByName` for names without an activation file, even if the
// name is owned, which breaks running the UI manually.
let destination = backend_proxy.as_ref().destination().clone();
let sender = match dbus_proxy.get_name_owner(destination.clone()).await {
Ok(sender) => sender,
Err(fdo::Error::NameHasNoOwner(_)) => {
let service_name = WellKnownName::try_from(destination.clone())
.expect("UiControl destination is a well-known name");
dbus_proxy.start_service_by_name(service_name, 0).await?;
dbus_proxy.get_name_owner(destination).await?
}
Err(err) => return Err(err.into()),
};
subscribe_ui_events(
self.conn.clone(),
sender,
Expand Down