SDK: Application Data Folders

Registered by Cris Dywan

Applications running under confinement don't have access to $HOME or $XDG_ locations freely as on the classic desktop. Most locations are ready-only or mediated by a service.


Use cases:
    U1Db. Databases belong into "share".
    Proposed solution: default relative paths to the right location.

    C++ QML plugin code. May need either "share" or "cache".
    Needs API functions to access files.

    When WebKit is used, files are automatically written to "share".

    Using localStorage API may use "share" and "cache" (currently /var/tmp/).

    Standard Qt5 API that works on the desktop today:

    On the desktop gettext reads .mo files containing translations from /usr/share/locale. On click packages it might make sense to read them from /opt/*$APP_PATH*/locale

    Which locations can we support with and without confinement?
    The $APP_ID used here is a placeholder that preferrably isn't exposed in API.

    Do pure QML apps need access to absolute locations?
    Unlikely. By design most QML API doesn't expose raw file access.

    What about Firefox, LibreOffice and friends?
    It's not clear if they will run under confinement - if they do, this only affects where internal data is stored, none of the GUI facing locations. That needs to be sorted separately.

Should XDG variables be overridden to enforce confined paths?
    This should be seen as a last resort and preferrably avoided. Applications can be run in different ways and under different environments ie. Unity, KDE, Elementary etc and even if variables could be overriden per application it would result in complicated paths.



Work Items

Work items for ubuntu-13.10:
[kalikiana] Collect use cases for app data storage: DONE
[kalikiana] Ensure U1Db-Qt uses a sensible storage folder: DONE
[kalikiana] Implement app-specific environment variables in confinement: DONE

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.


No subscribers.