We're now using U1DB to save the position in the book, so it syncs across devices. There's still a local file where this is stored; by default it goes into the $XDG_DATA_HOME for your app, ~/.local/share/<appname>/, and the apparmor profile makes sure you can write data there. But when you're running with qmlscene, it goes instead to ~/.local/share/Qt Project/QtQmlViewer/, which is not writable. Therefore, this setting does not persist between program runs.
Notes:
The LocalStorage databases are saved in ~/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases/. This works because this particular directory is writable. (This is the subject of a bug.)
Trying to make ~/.local/share/Qt Project/QtQmlViewer/ writable with the apparmor JSON file leads to apparmor errors.
There are two ways we might fix this. Either we tweak the environmental variables to make XDG_DATA_HOME be correct, or we fully specify the path for the database. This post and the following messages give some more detail on what happens behind the scenes.
Note that this directory is also our backup location for storing books. It looks like the creation of ~/Books works, so we shouldn't ever need this. But it'd be nice if it works nonetheless.
We're now using U1DB to save the position in the book, so it syncs across devices. There's still a local file where this is stored; by default it goes into the $XDG_DATA_HOME for your app,
~/.local/share/<appname>/
, and the apparmor profile makes sure you can write data there. But when you're running with qmlscene, it goes instead to~/.local/share/Qt Project/QtQmlViewer/
, which is not writable. Therefore, this setting does not persist between program runs.Notes:
~/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases/
. This works because this particular directory is writable. (This is the subject of a bug.)~/.local/share/Qt Project/QtQmlViewer/
writable with the apparmor JSON file leads to apparmor errors.There are two ways we might fix this. Either we tweak the environmental variables to make XDG_DATA_HOME be correct, or we fully specify the path for the database. This post and the following messages give some more detail on what happens behind the scenes.
Note that this directory is also our backup location for storing books. It looks like the creation of
~/Books
works, so we shouldn't ever need this. But it'd be nice if it works nonetheless.