# vim:syntax=apparmor
# ------------------------------------------------------------------
#
#    Copyright (C) 2009 Canonical Ltd.
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of version 2 of the GNU General Public
#    License published by the Free Software Foundation.
#
# ------------------------------------------------------------------

  # system configuration
  /usr/{,local/}share/applications/{*/,}               r,
  /usr/{,local/}share/applications/{*/,}defaults.list  r,
  /usr/{,local/}share/applications/{*/,}mimeinfo.cache r,
  /usr/{,local/}share/applications/{*/,}*.desktop      r,
  /usr/share/icons/               r,
  /usr/share/icons/**             r,
  /usr/share/pixmaps/             r,
  /usr/share/pixmaps/**           r,
  /usr/local/share/icons/               r,
  /usr/local/share/icons/**             r,
  /usr/local/share/pixmaps/             r,
  /usr/local/share/pixmaps/**           r,

  # this should probably go elsewhere
  /usr/share/mime/**              r,

  # per-user configurations
  owner @{HOME}/.icons/                 r,
  owner @{HOME}/.recently-used.xbel*    rw,
  owner @{HOME}/.local/share/recently-used.xbel* rw,
  owner @{HOME}/.config/user-dirs.dirs  r,
  owner @{HOME}/.config/mimeapps.list   r,
  owner @{HOME}/.local/share/applications/               r,
  owner @{HOME}/.local/share/applications/*.desktop      r,
  owner @{HOME}/.local/share/applications/defaults.list  r,
  owner @{HOME}/.local/share/applications/mimeapps.list  r,
  owner @{HOME}/.local/share/applications/mimeinfo.cache r,
  owner @{HOME}/.local/share/icons/     r,
  owner @{HOME}/.local/share/icons/**   r,
  owner @{HOME}/.local/share/mime/      r,
  owner @{HOME}/.local/share/mime/**    r,
