You can't, at least not for an arbitrary schema, and this is by definition of what a relocatable schema is: a schema that can have multiple instances, stored in multiple arbitrary paths.
Since a relocatable schema instance can be stored basically anywhere inside DConf, gsettings
has no way to list their paths, it does not keep track of instances. And dconf
can't help you either, as it has no notion of schemas at all, it only knows about paths and keys. It can list the subpaths of a given path, but that's about it.
It's up for the application, when creating multiple instances of a given relocatable schema, to store each instance in a sensible, easily discoverable path, such as a subpath of the (non-relocatable) application schema. Or store the instance paths (or suffixes) as a list key in such schema.
Or both, like Gnome Terminal does with its profiles:
org.gnome.Terminal.ProfilesList
is a non-relocatable, regular schema, stored at DConf path /org/gnome/terminal/legacy/profiles:/
- That schema has 2 keys, a
default
string with a single UUID, and a list
list of strings containing UUIDs.
- Each profile is an instance of the relocatable schema
org.gnome.Terminal.Legacy.Profile
, and stored at, you guess... /org/gnome/terminal/legacy/profiles:/:<UUID>/
!
This way a client can access all instances using either gsettings
, reading list
and building the paths from the UUIDs, or from dconf
, by directly listing the subpaths of /org/gnome/terminal/legacy/profiles:/
.
And, of course, for non-relocatable schemas you can always get their paths with:
gsettings list-schemas --print-paths