- contribute
- Persistent Storage
Adding new Persistent Storage features
Take these steps to add a new preset feature to the Persistent Storage:
Add a new
Feature
subclass to config/chroot local-includes/usr/lib/python3/dist-packages/tps/configuration/features.py.Add a new
Feature
subclass to config/chroot local-includes/usr/lib/python3/dist-packages/tps frontend/views/features view.py.Add a new
HdyActionRow
child to theGtkListBox
of the corresponding section you want to add the feature to.
You might need to add on-activated/on-deactivated hooks:
config/chroot local-includes/usr/local/lib/persistent-storage/on-activated-hooks
config/chroot local-includes/usr/local/lib/persistent-storage/on-deactivated-hooks
If you do, it's important that all privileged accesses of paths which
are writable by an unprivileged user (e.g. amnesia
) are done via the
/run/nosymfollow
mountpoint to avoid symlink attacks. For more
information, see the section on symlink attacks in
persistence.
Note that's is possible that on-activated hooks are run multiple times without the on-deactivated hooks being run in between, so they must handle that case gracefully.