vendredi 20 mars 2009

Firefox : Can 2 profiles share one history file ?

I was wondering if it was possible to have many profiles with one history file ? In case this is possible I can have the same autocompletion in all my profiles.

So let's start the investigation (Sherlock Holmes...)

1- I searched what was related to 'history' in one of my profile folder.
I found that:

- Firefox is using 'sqlite' as DBMS (hmmm interesting)
- There are many databases : places.sqlite, and many other sqlite files (content-prefs.sqlite, cookies.sqlite, downloads.sqlite, formhistory.sqlite, permissions.sqlite, places.sqlite, search.sqlite, urlclassifier3.sqlite, webappsstore.sqlite).

2- I started opening some of them and I focused on places.sqlite.

3- I created a link of profileA/places.sqlite in profileB/places.sqlite and rename profileB/places.sqlite. So now i have only profileA/places.sqlite. But I was surprise to see that when I start the 2 profiles, B is working fine but A has lost its memory. There is no autocompletion available for A even when i go to an address that i opened in another tab.

4- After some magick manipulations :-) what I understood is that when a profile is accessing a database, the file is locked so that another profile can't access it at the same time.

So the answer to my question is right now no (because you may never know), 2 profiles can't share the same history file.

BUT I was thinking that a small script (shell or firefox add-on) can update the history (or other databases) on the event 'close firefox' or '... event' :-)

Maybe I'll try it a friday night ... (friday is said to be the inspiration day :-))

See you next time for euuhhh i don't know, we'll see :-)

Aucun commentaire: