9

This is a vanilla Ubuntu 16.04 LTS, based on Xubuntu core to be exactly. So I need to install packages myself. All went well except meld, on starting which, I'll get:

(meld:4188): GLib-GIO-ERROR **: No GSettings schemas are installed on the system

[2]+  Trace/breakpoint trap  

I've found three existing answers, none of them is working for my case.

Following the suggestions, I've done reinstalling gsettings-desktop-schemas:

sudo apt-get install --reinstall gsettings-desktop-schemas

However, none of them is working.

  $ ls -l /usr/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml   
  -rw-r--r-- 1 root root 5354 2016-03-24 16:46 /usr/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml

$ XDG_DATA_DIR=/usr/share/glib-2.0/schemas/ meld ...
(meld:4326): GLib-GIO-ERROR **: No GSettings schemas are installed on the system

[2]+  Trace/breakpoint trap

I've consult this one as well, however, that's Redhat 6.3 server environment, and the OP was installing each component to its own prefix; thus he ran into errors like this. In other words, his case doesn't apply to my vanilla Ubuntu.

I've run out of options. Please help.

Thanks

$ gsettings list-recursively
No schemas installed

$ lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:        16.04
Codename:       xenial

$ uname -rm
4.4.0-21-generic x86_64

$ apt-cache policy meld gsettings-desktop-schemas
meld:
  Installed: 3.14.2-1
  Candidate: 3.14.2-1
  Version table:
 *** 3.14.2-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status
gsettings-desktop-schemas:
  Installed: 3.18.1-1ubuntu1
  Candidate: 3.18.1-1ubuntu1
  Version table:
 *** 3.18.1-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
9
  • 3
    Possibly related, the command gsettings list-recursively gives me the error No schemas installed. Do you get the same error? Commented May 30, 2016 at 12:30
  • 1
    To what value did you set XDG_DATA_DIR? Commented May 30, 2016 at 12:36
  • 3
    From old logfiles I see that I used to have XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/ while nowadays I have XDG_DATA_DIRS=:/var/lib/snapd/desktop. I do not configure this variable myself. Commented May 30, 2016 at 12:38
  • THANKS!! That works! Please "answer" so that I can "accept". More details -- after more investigation, I realized it is most probably a XUbuntu Core specific issue, because I have another system that I installed via net-install, and there is no issue with meld, even without the XDG_DATA_DIRS environment variable. Since I'm installing everything the same on both systems, the natural conclusion I have is that it is a XUbuntu Core specific issue.
    – xpt
    Commented May 31, 2016 at 15:26
  • 1
    Yes, my gsettings list-recursively returns No schemas installed too.
    – xpt
    Commented Jun 1, 2016 at 1:54

2 Answers 2

11

From post comments: Try setting:

export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/

This seems to be the old behaviour in Ubuntu 15.10. On closer inspection, it seems the "old value" is nowadays set in /etc/X11/Xsession.d/55gnome-session_gnomerc only if the session (in env var $STARTUP) matches the pattern gnome-session*. I have a ~/.xsession style startup so that's why it does not match for me. I guess Xubuntu might likewise have $STARTUP set to something not matching the pattern.

This all is possible to fine-tune through ~/.xessionrc which is sourced from /etc/X11/Xsession.d/40x11-common_xsessionrc. So you can just put the XDG_DATA_DIRS setting shown at the top of this answer in ~/.xsessionrc and the wanted value will get installed regardless of the session type. There you can also override what type of session you want etc. The files in /etc/X11/Xsession.d/ are all loaded (sourced) in alphabetically ascending order.

3
  • Oh, I start my X the old fasion way -- boot to text and startx, into WM (fluxbox), not a desktop. Maybe that's why. BTW, again, the simplest solution I found is unset XDG_DATA_DIRS, somewhere in profile.
    – xpt
    Commented Jun 2, 2016 at 1:57
  • I haven't tried, but I suspect it might still run those scripts I mentioned.. But yeah, good! Commented Jun 3, 2016 at 19:18
  • Actually, no, startx uses ~/..Xclients instead. That's why I never put my profile customization in either ~/..Xclients or ~/.xessionrc/.
    – xpt
    Commented Jun 4, 2016 at 12:49
3

I fixed similar problem by setting GSETTINGS_SCHEMA_DIR=/usr/share/glib-2.0/schemas

1
  • This also solves the issue for when running an executable built from source using the gtk-osx project.
    – Memophysic
    Commented Jun 12, 2021 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.