Re: [Tails-dev] Bookmarks persistence - help needed

Üzenet törlése

Válasz az üzenetre
Szerző: Ague Mill
Dátum:  
Címzett: The Tails public development discussion list
Tárgy: Re: [Tails-dev] Bookmarks persistence - help needed
Hi Alessandro,

On Fri, Oct 05, 2012 at 11:49:20AM +0100, Alessandro Grassi wrote:
> attached patch "0001-Added-bookmarks-preset.patch" adds a "Browser
> bookmarks" preset in tails-persistence-setup.
>
> It creates a "bookmarks" folder in the persistent volume and links
> files from this folder to /home/amnesia/.mozilla/firefox/default. It
> needs the "0001-generate-iceweasel-profile-at-build-time.patch" to be
> applied to Tails (see "generate Iceweasel profile at build time"
> discussion).


I suggest you always send the full patch series for review. It's small
enough it make sure there is no misunderstandings in which version of
the previously sent patches should be used.

> The "bookmarks" folder is supposed to contain the "places.sqlite" file
> alone. If it's not there when preset is turned on, a default one
> should be copied (creating an empty file won't work).


Having an empty file also did not work in my own tests. What worked was
to have a `places.sqlite` that was a symlink. When it was pointing to a
non-existent file, Iceweasel happily proceeded to create the file from
the default settings.

Instead of using the 'link' option of the persistence framework, how
about using another directory, then? This would result in the following
approach:

 * At build time:
   - create an Iceweasel profile,
   - create an empty `~/.mozilla/bookmarks` directory,
   - remove `places.sqlite` from the Iceweasel profile,
   - add a symlink `~/.mozilla/default/places.sqlite` pointing
     to `~/.mozilla/bookmarks/places.sqlite`.
 * When bookmarks persistence is activated:
   - add `~/.mozilla/bookmarks` to the set of persistent directories.


Wanna try it?

--
Ague