Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c

mingw

gtk

gtk3

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?

like image 454
DeltaProxy Avatar asked Mar 10 '15 00:03

DeltaProxy


2 Answers

The problem is with the Glib schemas that apparently are not compiled on your system.

You need the glib-compile-schemas and find the glib-2.0/schemas directory which is located in /usr/share/glib-2.0/schemas, I don't know if it will be found in the same path within MinGW, but I don't see why it wouldn't, so you must execute the following command1

glib-compile-schemas /usr/share/glib-2.0/schemas/

and that will create a file gschemas.compiled so you need write permission, then the error will go away.


1Provided that the GLib schemas are installed in that directory.

like image 137
Iharob Al Asimi Avatar answered Sep 18 '22 15:09

Iharob Al Asimi


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.

like image 20
ebassi Avatar answered Sep 17 '22 15:09

ebassi