GNOME Bugzilla – Bug 645254
Load settings schemas from ~/.local/share
Last modified: 2011-11-01 10:09:00 UTC
Plugins and extensions installed in the home directory, as well as locally built applications, want to use GSettings, but cannot use /usr or /usr/local for schemas, and it is very impratical to set GSETTINGS_SCHEMA_DIR at all times, in particular when it comes to gnome-shell extensions. I think it makes sense to look in ~/.local/share/glib-2.0/schemas (or actually, $XDG_DATA_HOME/glib-2.0/schemas) as well. Patch coming...
Created attachment 183811 [details] [review] GSettings: load schemas from $XDG_DATA_HOME as well Add $XDG_DATA_HOME/glib-2.0/schemas (~/.local/share/glib-2.0/schemas) to the default set of directories that are searched for GSettings schemas.
Any chance someone could re-visit this? Just ran into this issue on my box while following the instructions on http://live.gnome.org/GnomeShell/Extensions Based on those instructions, Gnome will just crash over and over. .xsession-errors shows: GLib-GIO-ERROR **: Settings schema 'org.gnome.shell.extensions.user-theme' is not installed aborting... (nautilus:1480): libnotify-WARNING **: Failed to connect to proxy (nm-applet:1478): libnotify-WARNING **: Failed to connect to proxy gnome-shell-calendar-server[1522]: Got HUP on stdin - exiting gnome-session[1402]: WARNING: Application 'gnome-shell.desktop' killed by signal Done!
Created attachment 193039 [details] [review] add g_get_all_data_dirs() and g_get_all_config_dirs() I believe that this bug is deserves a more fundamental treatment. Both in glib and gio, and in external applications, one typically wants to look at g_get_user_data_dir() (or g_get_user_config_dir()) followed by g_get_system_data_dirs() (or g_get_system_config_dirs()). Providing a single function that returns such a list would be, therefore, greatly convenient. In addition, the existence of such function would hopefully decrease the frequency of errors when an application entirely forgets to look in g_get_user_data_dir(). Such an error is present in glib-2.29.14 in two places: in initialise_schema_sources() in gio/gsettingsschema.c (as pointed out by Giovanni Campagna), but also in tree_magic_init() in gio/gcontenttype.c. This patch adds g_get_all_data_dirs() and g_get_all_config_dirs(); uses them to implement g_get_user_{data,config}_dir() and g_get_system_{config,data}_dirs(); and replaces a hodge-podge of code for making a list of all data dirs with a simple function call.
I don't think this is the correct way to handle this. I'd prefer the approach in bug 649717
*** Bug 663139 has been marked as a duplicate of this bug. ***