rschroll / beru

The Basic Epub Reader for Ubuntu
http://rschroll.github.io/beru/
GNU General Public License v3.0
24 stars 12 forks source link

Issue with file permission for U1DB file (page in book not saved) #19

Closed rschroll closed 11 years ago

rschroll commented 11 years ago

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:

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.