[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    Re: Detect new available names in bus
From:       Thiago Macieira <thiago () kde ! org>
Date:       2022-02-14 23:37:44
Message-ID: 2706408.ydLyOz2B4c () tjmaciei-mobl5
[Download RAW message or body]

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic