GLIB-COMPILE-SCHEMAS(1)
β¨ NAME β¨
glib-compile-schemas β the GSettings schema compiler, bestie π
πΈ SYNOPSIS πΈ
glib-compile-schemas [OPTIONβ¦] DIRECTORY
π¦ DESCRIPTION π¦
okay so picture this: you've got a whole folder of GSettings XML schema files and you need them to actually do something. That's where glib-compile-schemas comes in. It takes every single GSettings XML schema file hanging out in DIRECTORY and compiles them all into one binary file named gschemas.compiled, which is the thing GSettings can actually use. Slay. π
Quick heads up tho: those XML schema files must have the filename extension .gschema.xml, no exceptions, that's the vibe check. And if you want the full tea on what the XML file format actually looks like, go read the GSettings documentation, because this page is not doing that for you. π
At runtime, GSettings goes hunting for schemas in the glib-2.0/schemas subdirectories of every directory listed in the XDG_DATA_DIRS and XDG_DATA_HOME environment variables. And where do people usually install schema files, you ask? The usual spot is /usr/share/glib-2.0/schemas. That's the main character location fr fr. β¨
Now, plot twist: glib-compile-schemas doesn't only read schema files. It also reads βvendor overrideβ files, which are key files that can override default values for keys in the schemas. The way it works is iconic honestly β the group names in the key files are the schema ID, and the values are written in serialized GVariant form. And yes, vendor override files must have the filename extension .gschema.override. Don't forget it. π
By convention, vendor override files begin with nn_, where nn is a number from 00 to 99. And here's the hierarchy bestie: higher numbered files have higher priority. So if the same override is made in a file numbered 10 and then again in a file numbered 20, the override from 20 will take precedence. Number go up, power go up. π
π OPTIONS π
-h,--helpβ prints the help and then dips out. βοΈ--versionβ prints the program version and exits. Show me the numbers, queen. π--targetdir <TARGET>β storesgschemas.compiledin theTARGETdirectory instead of inDIRECTORY. Relocation era. π§³--strictβ aborts on any errors in schemas. And without this option? Faulty schema files just get quietly omitted from the resulting compiled schema. Like, ghosted. π» So use this if you want the drama surfaced instead.--dry-runβ does not writegschemas.compiled. Perfect for checking your.gschema.xmlsources for errors without committing to anything. A lil trial run, a vibe check, if you will. π--allow-any-nameβ does not enforce restrictions on key names.
β οΈ okay important: --allow-any-name is purely there to facilitate the transition from GConf, and it will be removed at some time in the future. So don't get attached. It's giving deprecated, it's giving temporary, it's giving enjoy-it-while-it-lasts. π
and that's the whole page bestie!! this was the glib-compile-schemas manual page, page name glib-compile-schemas(), no cap. go compile something gorgeous and remember: schemas compiled, problems solved, main character energy only. π«Άππ§ββοΈπΈ
π¦ where this page comes from
- arch rolling: glib2 2.90.1-1 Β· LGPL-2.1-or-later
- ubuntu stonking: libglib2.0-bin 2.90.0-1 Β· LGPL-2.1-or-later
- π the page's license: LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms