Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I started to write my own Gnome Shell Extensions and can't find any answer to this question -> is there any way, how to install gsettings schema on machine just via extension code (e.g. not copying schema.xml into glib-2.0/schemas directory and compiling by terminal)?

If I try to "make" access to not-installed schema it starts crashing and looking glass keeps telling that such a schema doesn't exist. It's really uncomfortable for potential users who wants to install those extensions.

share|improve this question
add comment

3 Answers

From everything I've been able to find (google and gtk docs), it seems that you've hit on exactly the reason why extensions installed via web browser can't store settings via dconf/GSettings - you have to install dconf schemas at the system level. There doesn't appear to be a way to have per-user schemas - dconf only uses the single compiled binary file.

The statement about adding support for this in Gnome 3.4 leads me to beleive they are going to a) implement an alternate method for extensions to store settings, or b) extend GSettings/dconf in a way that allows users to install/compile schemas under $HOME.

If anyone can confirm this (or refute it, with pointers to documentation), I, and many others I'm sure, would appreciate it.

This post mentions the limitation, but doesn't explain exactly why... http://www.ubuntubuzz.com/2011/12/gnome-shell-extensions-website-has-been.html

share|improve this answer
    
Well, I know that gnome shell extensions web can't install schemas (one of reasons why my extension was rejected), I actually think that it's because on system level -> I know that when I tried to add my schema into ~/.local/glib-2.0/schemas/ and compile it there, nothing was able to load it. But that's everything what I know about it –  Otaj Jan 7 '12 at 5:55
add comment

Currently, you can't. This is not even an extensions limitation, but rather a core one: there is no method in the GSettings library for programatically compiling schemas. You really need to use the command line tool for that.

And manually copying your schema to ~/.local/glib-2.0/schemas and compiling it there does not work by default because GSettings searches for schemas in the directories listed on the XDG_DATA_DIRS environment variable. If you add ~/.local/glib-2.0/schemas to XDG_DATA_DIRS it should work.

share|improve this answer
add comment

Actually, you can install GSettings schemas locally. Have a look at this question:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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