daemon: Skip UI service activation when already running - #239
Merged
iinuwa merged 1 commit intoSep 27, 2026
Merged
Conversation
iinuwa
requested changes
Sep 25, 2026
iinuwa
left a comment
Member
There was a problem hiding this comment.
Thanks for looking into this!
After addressing the comments, could you add a note to the changelog and change the fix: in your commit message to daemon:?
| // (e.g. dbus-broker) 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(); | ||
| if !dbus_proxy.name_has_owner(destination.clone()).await? { |
Member
There was a problem hiding this comment.
name_has_owner() invokes a D-Bus method, and then we invoke get_name_owner right after activating it. Let's instead do get_name_owner() to get the sender, and then if the error is NameHasNoOwner, then start_by_service_name() to cut down on the extra call. This way we only do 1 or 2 calls (which is more efficient than what we have now, so that's an improvement).
Bus implementations reject StartServiceByName for names without an activation file, even if the name is already owned. This broke running credentialsd-ui manually during development, since the daemon failed every request with "The name is not activatable". Look up the owner of the UI Control name first, and only request activation if it has no owner yet. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
LucFauvel
force-pushed
the
fix/ui-start-service-when-running
branch
from
September 27, 2026 14:01
ad1f4ed to
adcd571
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dbus-broker rejects StartServiceByName for names without an activation file, even if the name is already owned. This broke running credentialsd-ui manually during development, since the daemon failed every request with "The name is not activatable".
Only request activation if the UI Control name has no owner yet.