Detect new available names in bus

Thiago Macieira thiago at kde.org
Mon Feb 14 23:37:44 UTC 2022


On Monday, 14 February 2022 14:51:48 PST Sergio Costas wrote:
> I want to detect if the user has installed a service that offers the
> well-known name "org.gnome.ArchiveManager1" (usually it is offered by
> file-roller). I can do a call to "NameHasOwner()" and it will return
> TRUE if that name is registered, even if the service is not active
> (because it is launched on demand), or FALSE if it isn't available
> (because the package "file-roller" isn't installed).

If the service is activatable, you can use ListActivatableNames in the bus.

On my system:
$ qdbus org.freedesktop.DBus / ListActivatableNames | grep -F org.gnome
org.gnome.Identity
org.gnome.OnlineAccounts
org.gnome.keyring.SystemPrompter
org.gnome.keyring.PrivatePrompter

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering





More information about the dbus mailing list