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
Community
  • 1
  • 1
xpt
  • 20,363
  • 37
  • 127
  • 216
  • 3
    Possibly related, the command `gsettings list-recursively` gives me the error `No schemas installed`. Do you get the same error? – Jonas Berlin May 30 '16 at 12:30
  • 1
    To what value did you set XDG_DATA_DIR? – Jonas Berlin May 30 '16 at 12:36
  • 2
    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. – Jonas Berlin May 30 '16 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 May 31 '16 at 15:26
  • The old setting work, for me, XUbuntu 16.04 LTS, the nowadays setting of `XDG_DATA_DIRS=:/var/lib/snapd/desktop` doesn't, FYI. – xpt May 31 '16 at 15:27
  • 1
    Yes, my `gsettings list-recursively` returns `No schemas installed` too. – xpt Jun 01 '16 at 01:54
  • @JonasBerlin, I'm having exactly the same problem as yours, even my `XDG_DATA_DIRS` is `:/var/lib/snapd/desktop` as well. Please "answer" so that I can "accept". I'll wait for 2 days before I put in the "answer" myself. BTW, the simplest solution I found is `unset XDG_DATA_DIRS`. – xpt Jun 01 '16 at 02:19
  • Yeah that seems to work too. The `snapd` that is the new black in XDG_DATA_DIRS seems to be related to Snappy Ubuntu Core (http://www.ubuntu.com/cloud/snappy) – Jonas Berlin Jun 01 '16 at 21:13
  • This whole thing seems to be just another case of "crazy people that don't use defaults are shooting themselves in the foot anyway" mentality :) – Jonas Berlin Jun 01 '16 at 21:16

2 Answers2

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.

Jonas Berlin
  • 3,344
  • 1
  • 27
  • 33
  • 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 Jun 02 '16 at 01:57
  • I haven't tried, but I suspect it might still run those scripts I mentioned.. But yeah, good! – Jonas Berlin Jun 03 '16 at 19:18
  • Actually, no, `startx` uses `~/..Xclients` instead. That's why I never put my profile customization in either `~/..Xclients` or `~/.xessionrc/`. – xpt Jun 04 '16 at 12:49
3

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

kostashv
  • 111
  • 3