The GnuCash schemas are in /usr/share/glib-2.0/schemas along with a bunch of other app's schemas. Other apps don't seem to have an issue when I have the gedit-plugin-markdown_preview installed.
Take, for example, Yelp, the GNOME help viewer, which has a /usr/share/glib-2.0/schemas/org.gnome.yelp.gschema.xml. It loads up fine when gedit-plugin-markdown_preview is installed and ~/.local/share/glib-2.0/schemas/gschemas.compiled exists.
1️⃣ If I remove /usr/share/glib-2.0/schemas/gschemas.compiled, then Yelp throws a GLib-GIO-ERROR and won't start. but GnuCash still starts, just doesn't load any preferences.
2️⃣ If I copy /usr/share/glib-2.0/schemas/org.gnome.yelp.gschema.xml to ~/.local/share/glib-2.0/schemas/ and recompile the schemas, Yelp will start up again.
3️⃣ If I remove ~/.local/share/glib-2.0/schemas/gschemas.compiled, then Yelp throws a GLib-GIO-ERROR again, while GnuCash still starts, just doesn't load any preferences (since /usr/share/glib-2.0/schemas/gschemas.compiled is still missing).
4️⃣ Finally, when I restore /usr/share/glib-2.0/schemas/gschemas.compiled, GnuCash starts as expected, loading my last book and preferences. However, gedit fails to start (since ~/.local/share/glib-2.0/schemas/gschemas.compiled is still missing).
🔄 As a workaround, I can link /usr/share/glib-2.0/schemas/org.gnucash.GnuCash.* to ~/.local/share/glib-2.0/schemas and recompile the schemas. Then everything plays nice together.
It shows that Yelp can look in both ~/.local/share/glib-2.0/schemas and /usr/share/glib-2.0/schemas without any problem, but if GnuCash looks in ~/.local/share/glib-2.0/schemas and can't find what it's looking for, it just fails.
I guess it is a bug in GnuCash then? Is it something I should report upstream or do you do that?
Thanks
1️⃣
$ cd /usr/share/glib-2.0/schemas/
$ sudo mv gschemas.compiled gschemas.compiled.bak
$ yelp
(yelp:1191114): GLib-GIO-ERROR **: 22:53:41.766: Settings schema 'org.gnome.yelp' is not installed
Trace/breakpoint trap
$ gnucash
Found Finance::Quote version 1.52.
<Starts but doesn't load/save any preferences>
2️⃣
$ cd ~/.local/share/glib-2.0/schemas
$ cp /usr/share/glib-2.0/schemas/org.gnome.yelp.gschema.xml .
$ glib-compile-schemas ~/.local/share/glib-2.0/schemas
$ yelp
<Loads up normally>
3️⃣
$ rm ~/.local/share/glib-2.0/schemas/gschemas.compiled
$ yelp
(yelp:1191114): GLib-GIO-ERROR **: 22:53:41.766: Settings schema 'org.gnome.yelp' is not installed
Trace/breakpoint trap
$ gnucash
Found Finance::Quote version 1.52.
<Starts but doesn't load/save any preferences>
4️⃣
$ cd /usr/share/glib-2.0/schemas/
$ sudo mv gschemas.compiled.bak gschemas.compiled
$ gnucash
Found Finance::Quote version 1.52.
<Loads properly with all preferences>
<Close GnuCash>
$ gedit
(gedit:1199252): GLib-GIO-ERROR **: 22:59:02.802: Settings schema 'org.gnome.gedit.plugins.markdown_preview' is not installed
Trace/breakpoint trap
🔄
$ cd ~/.local/share/glib-2.0/schemas
$ ln -s /usr/share/glib-2.0/schemas/org.gnucash.GnuCash.* .
$ glib-compile-schemas .
$ gedit
<Loads up properly>
<Close gedit>
$ gnucash
Found Finance::Quote version 1.52.
<Loads properly with all preferences>