GTK+ file dialog causes segfaults / GLib-GIO-ERROR Settings schema 'org.gtk.Settings.FileChooser' does not contain a key named 'show-type-column'

Solution:
This seems to be caused by incompatible GTK+-schema settings, and seems to always occur, if a program uses a GTK+-library with is newer then the currently active GTK+settings, e.g. if

  • a package from unstable is used, with settings from “stable”;

    this can be worked around with:

    mkdir -p ~/.local/share/glib-2.0/schemas
    cp -pi /nix/store/...-gtk+3-3.<LATEST>/share/gsettings-schemas/gtk+3-3.*/glib-2.0/schemas/gschemas.compiled ~/.local/share/glib-2.0/schema/
    
  • settings are installed locally in ~/.local/share/glib-2.0/schemas (e.g. from the workaround above), but newer packages are used, e.g. after a NixOS-upgrade or newer packages from unstable.

    this may be solved by:

    rm -rf ~/.local/share/glib-2.0/schemas
    

    If this does not solve the issue, the newest settings have to be copied to this directory (see workaround above)

Questions:

  • Is there a way to fix this automatically?
  • Or maybe to detect this, and maybe other known problems by e.g. a new program ‘nix-check’?
  • Is there a place where such “solutions-to-common-problems” could be collected? Would the wiki be the right place?

relevant error-messages:

  • GLib-GIO-ERROR**: ... No GSettings schemas are installed on the system
  • GLib-GIO-ERROR **: ... Settings schema 'org.gtk.Settings.FileChooser' does not contain a key named 'show-type-column
  • other, similar ones
2 Likes