Comment 7 for bug 1454444

Revision history for this message
Sebastien Bacher (seb128) wrote :

Comment from https://code.launchpad.net/~ken-vandine/ubuntu-system-settings/lp1524424/+merge/280196

"How do applications know where to save data to? They write to a well
known directory under XDG_{CACHE,CONFIG,DATA}_HOME, so use that. Count
the logs and other stuff (if that actually does happen) as in use by the
system if it's too hard to do it any other way.

From https://wiki.ubuntu.com/SecurityTeam/Specifications/ApplicationConfinement:

  Applications will always have read access to their install directory
  and have write access to directories they own as determined by the XDG
  base directory specification. Specifically:
  XDG_CACHE_HOME/<APP_PKGNAME>, XDG_RUNTIME_DIR/<APP_PKGNAME>,
  XDG_RUNTIME_DIR/confined/<APP_PKGNAME> (for TMPDIR),
  XDG_DATA_HOME/<APP_PKGNAME> and XDG_CONFIG_HOME/<APP_PKGNAME>. Apps
  can discover these paths using standard APIs and appending the package
  name as defined by the 'name' field of the manifest."