Re: [Tails-dev] [patch, please review] generate Iceweasel p…

Delete this message

Reply to this message
Autor: Alessandro Grassi
Data:  
Dla: tails-dev
Temat: Re: [Tails-dev] [patch, please review] generate Iceweasel profile at build time
>
> People usually use Xvfb when they need a 'fake' X server. See the 'xvfb'
> package in Debian, and the `xvfb-run` script it contains.
>


xvfb works fine, new patch is attached ;-)

Now the real thing: make bookmarks persistent. I got it working using
dotfiles and putting places.sqlite in the right subfolder, so I can make a
preset in tails-persistence-setup which links "bookmarks/places.sqlite" to
"/home/amnesia/.mozilla/firefox/profiles/amnesia/places.sqlite" (I looked
at the code).

The only missing thing is the first-time behaviour: the existing
places.sqlite (or, if missing, a default one) must be moved to the
persistent storage and linked to the profile folder, and Iceweasel should
not be open while this happens.

Is there a way for tails-persistence-setup to execute a script on preset
activation?

Alessandro
From faf5d5d142c6d3a7928a106ec53dfb2660a8c2d6 Mon Sep 17 00:00:00 2001
From: Alessandro Grassi <alessandro.g89@???>
Date: Sun, 30 Sep 2012 15:43:03 +0200
Subject: [PATCH] generate iceweasel profile at build time

---
config/chroot_local-hooks/14-generate-iceweasel-profile | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100755 config/chroot_local-hooks/14-generate-iceweasel-profile

diff --git a/config/chroot_local-hooks/14-generate-iceweasel-profile b/config/chroot_local-hooks/14-generate-iceweasel-profile
new file mode 100755
index 0000000..be2054f
--- /dev/null
+++ b/config/chroot_local-hooks/14-generate-iceweasel-profile
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+#generate iceweasel profile at build time, so that it has a fixed name
+
+set -e
+apt-get --yes install xvfb
+xvfb-run iceweasel -CreateProfile default
+mv ~/.mozilla/firefox/*.default ~/.mozilla/firefox/amnesia
+sed -i "s@Path=.*\.default@Path=amnesia@" ~/.mozilla/firefox/profiles.ini
+mv ~/.mozilla /etc/skel
+apt-get --yes purge xvfb
--
1.7.10.4