David Graff - davidgraff.com Today with Dave, Downunder it's Friday, March 12th, 2010 @ 9:27 AM

How to use ThunderBird Portable Databases on Ubuntu Linux the easy way

Mozilla Thunderbird Portable is a great invention and I’ve used it for some time, on both Windows and Ubuntu Linux under wine.  While it works just fine for email, the whole integration thing was lacking under Ubuntu.  The things like opening attachments and clicking links didn’t work under Linux.  A small price to pay to have all your mail show up in your inbox, just as you left it, regardless which OS you choose to boot at the time (Especially when I was using POP).  But why pay that price if you don’t have to?

I use gmail behind the scenes for my mail, and use the IMAP feature to keep my inbox sync’d.  This means that all my mail is there, even if I just use two separate installs of Thunderbird.  But it also means you have to re-download messages, and waste twice the disc space, and time, and bandwidth (especially precious if you’re on mobile broadband).  Plus, keeping a backup copy is easy, as the files stay in the portable format, just drag and drop the folder to somewhere else.

So this is how I worked it out, many months later than I would have liked.  I keep this here in case I need to do it again sometime.

Tech Warning: there is jargon and commands behind this link!

1.  Setup Thunderbird Portable under Windows.

2. Boot to Ubuntu.  Install Thunderbird from Synaptic.  Start it up and fill out a profile.  Close Thunderbird.

3. Navigate to your Windows drive mount, and the Thunderbird folder.  Under the ..\ThunderbirdPortable\Data there is a folder called profile.  Open it and do the following for a series of files.  Right click it and select ‘Make Link’  and a file will show up called “Link to *****”.  The stars are the file or folder name.  Do this for abook.mab, virtualFolders.dat, the folder called Mail, and in my case, since I had gmail setup as an IMAP account, I did it for the folder called ImapMail.

4. Navigate to ~/.mozilla-thunderbird/

5. There will be a folder there with some random numbers and letters like qmgu30id.default.  Open this folder, it’s contents will look very much like Portable’s Data\profile  Copy your “Link to *****” files into the qmgu30id.default folder. (remember yours will be different, the letters are random at the time you set up the profile.)

6. Delete the files that correspond to your links, or rename them both, juggling it so the “Link to *****” actually gets named the file (remove the “Link to” part and the original File gets named something like OLD_File (which doesn’t matter anymore).

7. Start Thunderbird and enjoy native access to your mail database from both sides of the great OS divide.

I took the idea for this from elsewhere on the net.  It was trial and error to find out that I needed to do it for ImapMail too.

4 Responses to “How to use ThunderBird Portable Databases on Ubuntu Linux the easy way”

  1. Thanks for the post, David. I was getting a little annoyed myself running Thunderbird Portable under wine.

    A few other things that might be worth making links to include:
    1. prefs.js (contains interface and user settings)
    2. chrome/ folder
    3. extensions/ folder

    Cheers,
    John

  2. Looks like it’s all too complex and unnecessary: all you have to do is just modify profiles.ini and provide absolute path to your ‘portable’ profile, as well as setting IsRelative to 0

  3. Thanks John. I considered linking those other files as well, but found that since I use a custom sound for the email notification, I wanted to keep my settings separate, since the file is in different locations on the different file systems.

    Also, I don’t really know what the chrome folder does…

  4. To Art,

    I tried that approach and it didn’t work. It would work once, and the linux copy would function until I opened it under windows, and then upon returning to linux it would be completely blank.

    I can verify that the method I describe works very well and has been stable now for months.

Discussion Area - Leave a Comment