Closed ghost closed 5 years ago
Thanks. You've made two functional changes at once, so let's consider them one at a time. Tell me more about your problems with GLib not reading GSettings schema files in the bundle directory? I've not seen that.
Another solution would be to write the GSettings schema file to the bundle directory at runtime, but if the bundle directory is owned by root
(as it would be on an OLPC XO or on another system with the Browse activity pre-installed), Browse cannot do so except when the user is logged in as root
.
Just to let you know, and to correct myself, GLib can read schema files from the Browse activity's data directory, if that is included in the XDG_DATA_DIRS
environment variable. But there is no reliable way to append the Browse activity's data directory to the value of that variable automatically upon installation without appending to the user's login shell profile (a problem for third-party packagers) or gaining root access and creating a new file in /etc/profile.d
.
Thanks. My mistake, I meant the bundle instance data directory, not the bundle source directory.
On OLPC OS for XO-1 through XO-4, the files created by olpc-os-builder in /home/olpc/Activities
are owned by olpc:olpc. On OLPC OS for NL3 and later, the bundle is installed as a package into /usr/share/sugar/activities/Browse.activity
, is owned by root, and is read-only.
You need not worry about this for OLPC OS on an XO-1 through XO-4, because;
However, at the moment in the master branch, the schema source file and compiled schemas file are written to directory /home/user/.sugar/org.laptop.WebActivity/data/schemas
, which the user does own. Then GLib is asked to use it, in the call to _Gio.SettingSchemaSource.new_fromdirectory. Is that working for you? Tell me more about your problems with GLib not reading the schema files?
I have created new code incorporating my response to your concerns. I am now closing #93 and the related fork rcunning01/browse-activity and will incorporate my code into a new fork and a new pull request.
Thanks. In future, you can also push to the same branch, or use "git push --force".
This patch will make it easier for users to configure the search engine they prefer to use with Browse. Please note that, if this patch is applied, installation of Browse will require root access (and may not be chroot safe), as GLib cannot read GSettings schema files installed in the activity's bundle directory.