learningequality / kolibri-installer-gnome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instead of the device provision API, use auto provision files

dylanmccall opened this issue · comments

At the moment, kolibri-gnome automatically sets up Kolibri if needed by communicating with /api/device/deviceprovision. This is very clever and it allows the app to have a better understanding of Kolibri's state, and it spares us the ugliness of generating a json file at runtime. But it is also a lot of extra stuff, and on a shared system it is possible for someone else to communicate with Kolibri and call the provisioning API first.

Instead, let's move that auto provisioning completely to kolibri-daemon. Instead of using the web API, it should use Kolibri's AUTOMATIC_PROVISION_FILE system.

Note that, if kolibri-daemon is running as a different user (with Kolibri as a system service) that user may have a different locale than the desktop user, causing Kolibri to use that system user's language as default. I believe this is acceptable given our current understanding of that use case, but we could have the desktop app request a language in the D-Bus Start() method.

This was fixed with the changes in #99. Specifically, by the following set of commits: