Many of us use linux on dual boot system along with windows. We often use firefox in both linux and windows . It sometimes feel very annoying that some password that I had saved in firefox in windows or bookmark saved in windows , I can’t access that in linux. We can solve this problem and share common settings between windows and linux by utilizing the concept of soft links.
Your passwords are stored in two different files in firefox, both of which are required:
- key3.db – This file stores your key database for your passwords. To transfer saved passwords, you must copy this file along with the following file.
- signons.sqlite – Saved passwords.
- signons3.txt – Saved passwords
- places.sqlite -This file contains all your Firefox bookmarks and the list of websites you have previously visited.
The concept here is that in linux, we will create a soft link to these files pointing to firefox of windows.Thus both windows & linux will share common files and hence bookmarks, browsing history and passwords are shared.
The commands are–
xxxxxxxx represents a random string of 8 characters different on each installation.
ln -s “<path to profile folder of firefox in windows>/key3.db”
ln -s “<path to profile folder of firefox in windows>/signons3.txt” (Note– replace it with signons3.sqlite if you are using firefox 3.5 . )
ln -s “<path to profile folder of firefox in windows>/places.sqlite”
Path is –
Suppose your windows drive is mounted at /media/disk/ ( change accordingly in command for your mount point)
then path is
For (Windows XP/2000)
/media/disk/Documents and Settings/<username of windows>/Application Data/Mozilla/Firefox/Profiles/xxxxxxxx.default
For (Windows Vista/Windows 7)
/media/disk/Users/<username of windows>/AppData/Roaming/Mozilla/Firefox/Profiles/xxxxxxxx.default
As an example , I show the sequence of commands on my system…
ln -s “/media/disk/Documents and Settings/manoj/Application Data/Mozilla/Firefox/Profiles/pz2cmxos.default/key3.db”
ln -s “/media/disk/Documents and Settings/manoj/Application Data/Mozilla/Firefox/Profiles/pz2cmxos.default/signons3.txt”
ln -s “/media/disk/Documents and Settings/manoj/Application Data/Mozilla/Firefox/Profiles/pz2cmxos.default/places.sqlite”
- Firefox 3.5 onwards , passwords are in signons3.sqlite . If using firefox 3.5 , both windows , linux should have firefox version 3.5 or above.
- A point of caution is that windows drive should have a fixed mount point in your linux filesystem. Otherwise during the next reboot, the soft links will become invalid. To set a fixed mount point for windows drive every time the system boots, we can append the appropriate entry in file /etc/fstab.
/dev/sdax <mount point> ntfs-3g rw,defaults,umask=0000 0 0
/dev/sdax is your windows partition (can be sda1,sda2 or other)
<mountpoint> is the mount point in linux filesystem where windows drive will be mounted.
e.g. in my system , it is
/dev/sda1 /media/disk ntfs-3g rw,defaults,umask=0000 0 0