GNOME Bugzilla – Bug 778225
RFE: gsettings is missing path retrieval functionality for relocatable schemas
Last modified: 2018-05-24 19:23:15 UTC
** Note: this is not really a bug but rather a request for enhancement ** gsettings allows to list relocatable schemas and find UUIDs of list elements (eg. teminal profiles). But it seems to be impossible to detect the path suffix with gsettings (v.2.50.2) even though paths are explicitly presented in the schema. Paths are required to access and change elements in relocatable schemas. Example: To get/set parameters in multiple gnome-terminal profiles, one must know and use the hardcoded (as of now) path "/org/gnome/terminal/legacy/profiles:/" along with the schema "org.gnome.Terminal.Legacy.Profile". You either should lookup for the path in dconf editor, or inspect the schema yourself or find this useful Q&A: https://wiki.gnome.org/Apps/Terminal/FAQ#How_can_I_change_a_profile_setting_from_the_command_line.3Fprofile=$(gsettings%20get%20org.gnome.Terminal.ProfilesList%20default) If the path changes in the future by developers, the scripts that use it will not be able to detect such change automatically and will require manual editing. Unless I missed some unknown to me design considerations, this should not be difficult and time-consuming to fix. For the example above it could be something like: gsetting list-paths org.gnome.Terminal.Legacy.Profile or alternatively: gsettings get org.gnome.Terminal.ProfilesList list-path
A potential solution to this is to allow relocatable schemas to specify a path prefix at which instances of the schema are likely to be found. See comment #35 on bug #789969 for details.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1242.