Skip to content
This repository has been archived by the owner on Jan 9, 2018. It is now read-only.

crashes gnome-shell when installed into ~/.local #95

Open
aldafu opened this issue Jun 3, 2012 · 7 comments
Open

crashes gnome-shell when installed into ~/.local #95

aldafu opened this issue Jun 3, 2012 · 7 comments

Comments

@aldafu
Copy link

aldafu commented Jun 3, 2012

Using the gnome3.4 branch of this extension with Fedora 17 and installing this extension into $HOME/.local will crash gnome-shell, logout the user and disable all extensions.

Steps to reproduce:

  1. autogen.sh --prefix=$HOME/.local
  2. enable weather extension
  3. crash
@ferdnyc
Copy link

ferdnyc commented Jun 3, 2012

(Duplicated from my comments in #80:)
@aldafu: I suspect that's due to the GSettings schema not getting installed properly. I build the extension installed into my home directory under $HOME/share/gnome-shell/extensions/ (using configure --prefix=$HOME), thus the schema is installed and compiled in $HOME/share/glib-2.0/schemas. I can report that using that method works fine and causes no problems for the Shell.

@aldafu
Copy link
Author

aldafu commented Jun 3, 2012

@ferdnyc Can you be more specific? Using my prefix the schemas get installed into the .local sub directory. What exactly is it that could be failing here? Gsettings not picking them up?

@ferdnyc
Copy link

ferdnyc commented Jun 3, 2012

@aldafu: Exactly, there's no .local equivalent to the GSettings schema dir. (In fact, you'll notice there's no $HOME/.local/share/glib-2.0 at all. Well, you probably have one now, because the weather extension installer created it. But it's not supposed to be there.)

That's a big part of the reason that extensions with custom GSettings weren't supported in GNOME 3.0 and 3.2, and why there needs to be migration work done on our end to make the extension completely ready for extensions.gnome.org even under GNOME 3.4. That custom schema "breaks all the rules" for user-space .local extensions.

However, GSettings by default will look in two locations for its schemas:

  • /usr/share/glib-2.0/schemas/
  • $HOME/share/glib-2.0/schemas/

So, if you compile and install with --prefix=$HOME, The Right Things™ are done to make GSettings happy (specifically, schema installation and compilation with glib-compile-schemas), the configurator is functional, and all is right with the Universe. :-)

@ferdnyc
Copy link

ferdnyc commented Jun 3, 2012

Also, I apologize, I'd made at typo in my first comment, saying that the extension was installed under $HOME/lib/gnome-shell/extensions/. It actually installs to $HOME/share/gnome-shell/extensions/. I've corrected that in the original comment.

@aldafu
Copy link
Author

aldafu commented Jun 4, 2012

All kinds of other software is using $HOME/.local/share, I wonder why gsettings isn't then. Polluting my $HOME by using $HOME/share is not what I had in mind.

Anyway, that's not the fault of the weather extension. ;) Can the extension be fixed to not crash if the schemas are missing (and thereby losing its settings, I guess)? With Gnome 3.0 and 3.2 I also had it installed in .local and it always worked fine for me, so that's where I'd like to keep it.

@aldafu
Copy link
Author

aldafu commented Jun 4, 2012

I've did some research and found http://git.gnome.org/browse/gnome-shell-extensions/tree/lib/convenience.js. The getSettings function in there tries to find the schema in a directory that is parent to the extension dir. It seems to me that this is the best solution to finding the schema and it would fix this issue.

Besides copying that function it's also needed to update the Makefile to install the schema in the extension dir.

@darkxst
Copy link

darkxst commented Jun 5, 2012

Indeed, the general idea with 3.4 is the schemas (and locale) files are self-included within the extension directory. If using the convience script then it will load the schema from $extension_dir/schemas. Otherwise you can use g_settings_SchemaSource to load a schema file from any custom path.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants