1

Well, looking for manners of manipulate dconf keys without a GUI I realize that, only when correctly setup a dconf schema enables its key management through GSettings CLI.

I also observed that ANY of GNOME extensions I've choose to use (from a 22-item wide list) have done this properly (thus not providing GSettings manipulation). nevertheless, for example, it's just possible to query a dconf key type using gsettings range command, since dconf in itself do not supply one operation for this purpose.

Question

How should a gschema.xml file properly be 'installed' in a dconf storage system?

6
  • 1
    if you have gshema.xml file you will typically compile it with the command glib-compile-schemas – UnKNOWn Jun 4 '20 at 1:32
  • Where should I store compiled file to ensure gsettings cli find it out? – artu-hnrq Jun 4 '20 at 4:20
  • 1
    you need to decide where to store between 2 choices.. as a root /usr/share/glib-2.0/schemas/yourgschema.xml as a local user $HOME/.local/share/glib-2.0/schemas/yourgschema.xml – UnKNOWn Jun 4 '20 at 5:52
  • it is easier to answer if you show which gschema.xml are not showing... – UnKNOWn Jun 4 '20 at 5:59
  • 1
    you should not compile until you copy the gschema.xml file to any of the folder said above.. – UnKNOWn Jun 4 '20 at 6:01
2

If your extension have gschema.xml file.. and after successful installation of the extension, if you dont find the gsetting keys mentioned in the gschema.xml file.. It indicates that the gschema.xml file is not compiled while the installation process..

In such case.. you need to manually compile the gschema.xml which is provided with the extension.

to compile the schemas.. first copy the gschema.xml provided by the extension, to any of the folder mentioned below..

$HOME/.local/share/glib-2.0/schemas/
/usr/share/glib-2.0/schemas/

Where to copy in above two choices is self explanatory.. first one for local or per user based.. second one is global or admin based..

to compile the schemas.. run the below command from the any directory mentioned above.

glib-compile-schemas .

Example:

As a local user

cd $HOME/.local/share/glib-2.0/schemas
glib-compile-schemas .

for global or as a Admin

cd /usr/share/glib-2.0/schemas
sudo glib-compile-schemas .

Note that, In a default installation $HOME/.local/share/glib-2.0/schemas will not be available so you need to create the directories first with below command

mkdir -p $HOME/.local/share/glib-2.0/schemas

Similarly when you delete the extension or you want to remove the gsetting keys..

Delete the file gschema.xml and then run the glib-compile-schemas command.

1
  • 1
    Just one observation. Typically the GNOME extensions installed by the user are installed in $HOME/.local/share/gnome-shell/extensions. Here you will find a folder for every extension. Inside every extension folder you'll find s folder called schemas where you find the gschema of that extension. This is the file to copy to $HOME/.local/share/glib-2.0/schemas. This means that usually the gschemas are already available, you should simply put them in the correct folder and compile them. – Lorenz Keel Jun 4 '20 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.