(wxmaxima) crash: GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed

  • Done
  • quality assurance status badge
Details
3 participants
  • Danny Milosavljevic
  • 宋文武
  • Ludovic Courtès
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal

Debbugs page

Danny Milosavljevic wrote 9 years ago
(address . bug-guix@gnu.org)
20160410132559.73fef5dc@scratchpost.org
When I start wxmaxima and go to "Save As", it crashes, printing this message beforehand:

(wxmaxima:24842): GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed

Trace/breakpoint trap
Danny Milosavljevic wrote 9 years ago
(address . 23260@debbugs.gnu.org)
20160505134847.68e5056d@scratchpost.org
I finally got to the bottom of it.

It says:

(wxmaxima:27910): GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed

and it's right. I'm not sure how it's supposed to find them.

On this GuixSD installation I only have a minimal number of packages in the operating-system definition of the system profile (and gtk is not in it). I have installed gtk into my user's profile but I really shouldn't have to, right? (and it still doesn't work)

However, lots of programs use gtk. If they do, they'll sooner or later need the filechooser. However, gtk-3 filechooser needs its settings schema.

Environment variables with "GTK" in the name are:

GTK_DATA_PREFIX=/run/current-system/profile
GTK_PATH=/gnu/store/mjjkx5fq0gn5bg89pz2gsipjs975m2im-gtk+-3.18.2/lib/gtk-3.0
GUIX_GTK3_PATH=/home/dannym/.guix-profile/lib/gtk-3.0:/home/dannym/.guix-profile/lib/gtk-3.0

But the schema 'org.gtk.Settings.FileChooser' is not found since it's in:

/gnu/store/mjjkx5fq0gn5bg89pz2gsipjs975m2im-gtk+-3.18.2/share/glib-2.0/schemas

which is installed nowhere. I know I can easily workaround this by manually installing it in the system profile - but shouldn't it be solved in some better manner?

The package which manages the schemas is glib. The package which has the schema 'org.gtk.Settings.FileChooser' is Gtk. The directory specified (twice) in GUIX_GTK3_PATH contains only:

./3.0.0/immodules.cache
./3.0.0/immodules/im-viqr.la
./3.0.0/immodules/im-am-et.la
./3.0.0/immodules/im-thai.so
./3.0.0/immodules/im-am-et.so
./3.0.0/immodules/im-xim.la
./3.0.0/immodules/im-thai.la
./3.0.0/immodules/im-inuktitut.la
./3.0.0/immodules/im-cyrillic-translit.la
./3.0.0/immodules/im-multipress.la
./3.0.0/immodules/im-ti-et.so
./3.0.0/immodules/im-ti-er.so
./3.0.0/immodules/im-cedilla.la
./3.0.0/immodules/im-viqr.so
./3.0.0/immodules/im-ipa.la
./3.0.0/immodules/im-multipress.so
./3.0.0/immodules/im-ti-et.la
./3.0.0/immodules/im-xim.so
./3.0.0/immodules/im-ti-er.la
./3.0.0/immodules/im-ipa.so
./3.0.0/immodules/im-cedilla.so
./3.0.0/immodules/im-inuktitut.so
./3.0.0/immodules/im-cyrillic-translit.so
./3.0.0/printbackends/libprintbackend-cups.so
./3.0.0/printbackends/libprintbackend-cups.la
./3.0.0/printbackends/libprintbackend-lpr.so
./3.0.0/printbackends/libprintbackend-file.so
./3.0.0/printbackends/libprintbackend-file.la
./3.0.0/printbackends/libprintbackend-lpr.la

So it can't find it there either.

How is this supposed to work?
Danny Milosavljevic wrote 9 years ago
(address . 23260@debbugs.gnu.org)
20160505175900.4ddddb33@scratchpost.org
In glib-2.46.1/gio/gsettingsschema.c there's a function "initialize_schema_sources" which is responsible for initializing the schema sources.

It uses g_get_system_data_dirs() and traverses the result (which are supposed to be names of directories), and it checks an environment variable GSETTINGS_SCHEMA_DIR for the name of ONE directory; the basename of the regular file searched for is called "gschemas.compiled".

Using

$ export GSETTINGS_SCHEMA_DIR=/gnu/store/xz2vmk68f5jpscvpqqz1zqa7xr2ydarn-gtk+-3.20.1/share/glib-2.0/schemas

makes it work. However, that can't be the right fix. Among other things, one can only specify a single directory that way. Also, the average user probably doesn't even know what glib schemas are.

If that is fine anyway (why?), there seems to be already an environment variable "GTK_PATH" set by guix, so auto-setting

$ export GSETTINGS_SCHEMA_DIR="${GTK_PATH}/../../share/glib-2.0/schemas"

should make it work for the time being.

I don't think this bug is specific to wxmaxima. I suggest to retitle it "Gtk3 FileChooser doesn't work - it doesn't find its settings" or something.
宋文武 wrote 9 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 23260@debbugs.gnu.org)
878tyuflan.fsf@member.fsf.org
Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (29 lines)
> I finally got to the bottom of it.
>
> It says:
>
> (wxmaxima:27910): GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
>
> and it's right. I'm not sure how it's supposed to find them.
>
> On this GuixSD installation I only have a minimal number of packages
> in the operating-system definition of the system profile (and gtk is
> not in it). I have installed gtk into my user's profile but I really
> shouldn't have to, right? (and it still doesn't work)
>
> However, lots of programs use gtk. If they do, they'll sooner or later need the filechooser. However, gtk-3 filechooser needs its settings schema.
>
> Environment variables with "GTK" in the name are:
>
> GTK_DATA_PREFIX=/run/current-system/profile
> GTK_PATH=/gnu/store/mjjkx5fq0gn5bg89pz2gsipjs975m2im-gtk+-3.18.2/lib/gtk-3.0
> GUIX_GTK3_PATH=/home/dannym/.guix-profile/lib/gtk-3.0:/home/dannym/.guix-profile/lib/gtk-3.0
>
> But the schema 'org.gtk.Settings.FileChooser' is not found since it's in:
>
> /gnu/store/mjjkx5fq0gn5bg89pz2gsipjs975m2im-gtk+-3.18.2/share/glib-2.0/schemas
>
> which is installed nowhere. I know I can easily workaround this by
> manually installing it in the system profile - but shouldn't it be
> solved in some better manner?

Yes, as you found, the FileChooser schema must be known by wxmaxima
via GSETTINGS_SCHEMA_DIR or XDG_DATA_DIRS.

There is a `glib-or-gtk-build-system', when use it, all executables
will be wraped with XDG_DATA_DIR, combining from inputs's $out/share
directories. Currently, applications using gsettnigs can be handled
this way or wrap it manually using `wrap-program'.


Thanks for your report, I fixed this specified issue
in commit de477809d773.
Ludovic Courtès wrote 9 years ago
control message for bug #23260
(address . control@debbugs.gnu.org)
87wpk0ige8.fsf@gnu.org
close 23260 0.11.0
?
Your comment

This issue is archived.

To comment on this conversation send an email to 23260@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 23260
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help