GLib-GIO-ERROR**: No GSettings schemas are installed on the system

DeltaProxy picture DeltaProxy · Mar 10, 2015 · Viewed 17.4k times · Source

Unfortunately, I am using Windows (Windows7 x64). With MinGW compiler in Code::Blocks and GTK+3.6.4. I compiled manually all the schemas from glib.


When I use File Chooser dialogue / colorpicker - it doesn't matter, I am getting the following error: GLib-GIO-ERROR**: No GSettings schemas are installed on the system and the program terminates.


What do I have to do to fix this?

Answer

ebassi picture ebassi · Mar 10, 2015

GSettings looks at the compiled schemas in the directories pointed by the $XDG_DATA_DIR environment variable. You can either use a launcher script that sets up the environment for you, or you can rely on the prefix, and install the gschemas.compiled files in the share/glib-2.0/schemas directory under the same prefix as your app binary is, e.g. if you have the following layout:

YourApp/
  bin/
    YourApp.exe
  lib/
    libgtk3.dll
    libgobject.dll
    …
  share/
    …
    glib-2.0/
      schemas/

Make sure that the gschemas.compiled file is under YourApp/share/glib-2.0/schemas, and that the org.gtk.Settings.FileChooser.gschema.xml is there as well.