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.

According to specified technical requirements, a commercial application must be self‑contained in a single directory (which I agree is a good requirement), and use ~/.config/<app-name> for its configuration data (good requirement too). However, Gsettings requires to have a schema file installed inside of some subdirectory of $XDG_DATA_DIRS. Do I have to understand commercial applications can't make use of GSettings?

Update

I've found another page, which seems to suggest requirements are not exactly that restrictive. The latter mention installation of an icon file in /usr/share/icons/ and a desktop file in /usr/share/applications/. If that's OK, may be that's OK too, to install a GSettings schema in /usr/share/glib-2.0/schemas/? That would still be better to have confirmation. I feel the first mentioned link, lacks precisions.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You don't need to install schema files into /usr/share/glib-2.0/schemas/, they can be installed into any ${XDG_DATA_DIRS}/glib-2.0/schemas/.

So you can install your schema to /opt/<yourapp>/share/glib-2.0/schemas, then have your binary add /opt/<yourapp>/share to the XDG_DATA_DIR environment variable before you try to use GSettings.

This is what we do for Quickly apps being installed into /opt/extra.ubuntu.com/<appname>/

share|improve this answer
    
Works fine. The only issue is if a user opens dconf-editor, then he/she will see a set of keys with no associated schema. But that's OK, and is for investigation for now. –  Hibou57 Feb 19 '13 at 5:37

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.