Thunderbird - Zorin OS apt vs Flatpak

Hi all

So I managed to export my Win10 Thunderbird v138 settings and import into Zorin OS Thunderbird (apt) v115.18 without too much hassle although it seems to have lost my email on opening a second time - maybe because I haven't configured the IMAP/SMTP passwords. However it looks quite clunky in comparison to v138. I'm not sure if this is down to version changes or simply going from Win10 to Zorin versions of Thunderbird?

So I installed the flatpak version v138 and lost 3 hours trying to import the backup files and configure the folder paths. It seems Flatpak uses .var folder and for unknown reasons I can't access the profile root folder using the app's Help Troubleshooting information Open button which indicates something wrong. It's not in .var either, here's the path: /home//.thunderbird/asdsdasd.Default User.

It fails to import, it creates incorrect folders all over the place, mainly pointing to cache folders in .var

Oh dear, this really is painful for a nuub!

How do I get Thunderbird to install and import a profile successfully using Flatpak?

Cheers

You are correct, Flatpak packages use a different path for the configuration and installed files and that's what's causing your profile earlier imported from not being detected. Take a look at this post to solve this issue:

1 Like

Thank you.

Having skim read the 20 pages I really am starting to believe this is just all too difficult. Sorry, but this should be a case of export/import. Why oh why all these issues with packagers, it's one significant reason why MS steals the market. The typical potential Win10 convert can't / won't want to spend hours trying to get the app to simply run in the first instance (and whilst that's fun) it's frustrating.

What is the root cause here, Thunderbird, Zorin, Packagers, or?

I think all I need is to create the symbolic link so the Flatpak installed version can see the files at /.thunderbird?

ln -s ~/.var/app/org.mozilla.thunderbird/.thunderbird ~/.thunderbird

1 Like

Correct, but there's a slight wrinkle: since you've launched Thunderbird and tried to set things up, you first need to remove the existing directory at ~/.thunderbird. To make sure it's stays out of the way without actually deleting it, run this first:

Btw, you should close Thunderbird first just to make sure the profile directory is not re-created while you do this cleanup.

mv ~/.thunderbird ~/.thunderbird.bak

If this commands shows an error saying that it doesn't exist or whatever, that's also a good sign and you can proceed anyway. This is just a precaution.

ln -s ~/.var/app/org.mozilla.thunderbird/.thunderbird ~/.thunderbird

Let's get this fixed first, then I'll reply to the other questions that you have about Linux, packages, etc.

1 Like

You have the patience of a saint and sound like me when I speak to paying clients lol!

Folder renamed successfully (it was there), link created (although doesn't show in File manager Nautilus), I know it was created successfully as terminal reports already created if I try creating a second time.

TB still cannot open the path in About Profiles (the 'open button' fails to open anything).

After an import of previous TB profile (which seemed to conclude far too quick) I still receive ' Unable to open the summary file for inbox on perhaps there was an error on disk or the path is too long.' I suspect TB simply can't find the right path even with the symbolic link?

1 Like

Oops, this is embarrassing... I just made the same mistake again as from the other thread that I linked to.

That's a nuance with terminal commands, casing matters. The correct command is with an uppercase "T":

Sorry about that... follow the instructions I gave in the post above: delete the symbolic link you just created and run the same command, but make sure you enter capital "T" Thunderbird:

ln -s ~/.var/app/org.mozilla.Thunderbird/.thunderbird ~/.thunderbird

Yes, any file that starts with a dot (like in .thunderbird or .var) is a "hidden" file and won't show up by default. You can toggle this setting in Nautilus through the preferences menu. There are quite a lot this which is why it's disabled by default.

Well, sometimes :smiley:

1 Like

I have hidden files on, it's kinda a Windows admin thing to find out which files are hidden/system and enable them all for ever!

Still can't see it. UPdate, my apologies, it's a file, I spotted it! For some reason I was expected a folder (blue). PICNIC!

OK, TB can now open the root directory profile folder using the About file dialog - open directory button - progress, brill, thanks.

Sadly an import failed with 'Import failed unexpectedly'. I'll uninstall the flatpak and carry out all instruction again from fresh.

This may be an error with the application itself, not with how it's installed. As I don't use Thunderbird myself I'm not too familiar with what it is that it's supposed to be looking for when importing profiles. If you're importing from another file that exists in your file system, make sure to place that file inside the Downloads folder (this has to do with Flatpak packages, I'll explain later).

There's nothing special about hidden files, just the name and how each application (in this case, Nautilus) handles them. I suppose it's just not created properly... which might explain why the profile import doesn't work.

In any case, this whole thing with the symbolic links it's just a way to fix the issue that arises from installing Thunderbird as a Debian, or APT, package and then installing it as a Flatpak. If there is no ~/.thunderbird file nor directory and you want to use the Flatpak version, you don't need to do anything else.

Sad times after all your hard work and patience.

However after some back and forth of copying folders/files from the backup to the new default profile beneath .var and selecting one option at a time during the import stage I've finally got it up and profile imported! And it's beautifully skinned replicating the Windows version, so it was the version of TB.

5 hours later and lots of your help.

I want to now replicate the whole process and update my notes!

Cheers

1 Like

Good job! I think what happened here is a conflict with installing the APT version first and then Flatpak. You see, the application itself (Thunderbird in this case) doesn't care how it's packaged up and installed, and will look for configuration and other files at specific locations in the file system. The problem is that Flatpak runs in isolation from the rest of the file system and this "sandboxed" environment limits the visibility of certain locations.

Often times, this isn't a problem but some times it can be. Another important thing to understand this sort of issue is that when uninstalling software, there are usually some files left behind, that can help with things like re-installation at a later point or to fix a particular issue. A feature that aims to be helpful but sometimes can get in the way — In this case, the profiles folder.

The combination of these two things is what caused this problem, and I'm sensing that more people have run into this but didn't come here to ask for help... I should probably write this up so that people can find it more easily.
If you're sure you've fixed it, please update your post here on how exactly. It can be very helpful to others who might run into this as well.

Cheers!

1 Like

Did You take a Look at the Thunderbird Website? You can download their the new Version and there are Instructions how to set it up. It's not that easy but maybe worth a Try. It is a .tar File, so it isn't simply clicking on it like a .deb File. Here is the Describtion (in Case You want save it in the home Folder):

I will. I'll uninstall and start from scratch making notes, then update with a separate post, unless you'd prefer it in this chain?

Thanks again. I need a break, time for the sauna!

A new post preferably and then we can mark that as the solution for this whole thread. I'm planning on writing a quick guide to troubleshoot this as well, but I'm not sure how Thunderbird works or handles profiles so I'm curious about this, so every body wins :slight_smile:

Enjoy the sauna!

1 Like

I much prefer Evolution, the de facto mail client for Zorin. This 'might' be better:

q

To migrate a Thunderbird mail profile from Windows 10 to Evolution in Ubuntu 22.04, follow these steps:

  1. Backup Thunderbird Profile on Windows : First, locate and back up your Thunderbird profile on Windows. The profile folder is usually located in C:\Users\[YourUsername]\AppData\Roaming\Thunderbird\Profiles\[profile folder] . Copy the entire profile folder to an external drive or a cloud storage service for safekeeping.
  2. Install Evolution on Ubuntu : Ensure Evolution is installed on your Ubuntu system. You can install it using the command sudo apt install evolution .
  3. Transfer Profile to Ubuntu : Move the backed-up Thunderbird profile folder to your Ubuntu system. Place it in the .thunderbird directory in your home folder. The path should be ~/.thunderbird/[profile folder] .
  4. Convert mbox Files : Thunderbird uses mbox files to store emails. You need to convert these mbox files into a format that Evolution can read. One way to do this is to use a tool like mb2eml or mbox2maildir to convert mbox files to a format compatible with Evolution.
  5. Import Converted Files into Evolution : After converting the mbox files, import them into Evolution. You can do this by going to File > Import in Evolution and selecting the converted files.
  6. Set Up Email Accounts in Evolution : Finally, set up your email accounts in Evolution. Go to Edit > Preferences > Mail Accounts , and add your email accounts using the same settings you had in Thunderbird.

By following these steps, you can migrate your Thunderbird mail profile from Windows 10 to Evolution in Ubuntu 22.04 without re-downloading your emails.

AI-generated answer. Please verify critical facts.

I have only just seen this thread so apologies for late posting.

I have been a Thunderbird user since forever - very early days - both in windows and now also on Zorin. I originally installed the apt version, but when I installed it on my partner's fresh Zorin install I installed the Flatpack version as I realised it was much more up to date and much closer to the Windows version, so I installed it also on my Zorin PC.

The first thing after installing the Flatpack, I used Flatseal to switch 'All user files' to ON. This allows Thunderbird Flatpack to access 'normal' file system locations, where I had my saved profile.

I have successfully copied over profiles from Thunderbird windows to Zorin on several occasions and never exprerienced an issue.

Thunderbird (menu->Tools-> Export can create an automatic backup file. It advises that if your profile folder is larger than 2GB to just copy the profile folder yourself, with a link to open your current profile folder. This is what I have always done.

On installing Thunderbird, on first run I ignore its setup wizard, or close it, and go directly to tools->Import to import from my saved profile.

If you are still experiencing an issue I'm happy to take a look at my settings if I can help.

1 Like

Hi Neil

Cheers. I've seen Flatseal briefly mentioned but unsure what its role is. Seems like a possible simple solution, although unsure why this wasn't mentioned previously, however the clever symbolic name map did the trick. I also wanted the latter TB version as the Windows recent version is far more polished looking as you mention.

I also migrated from Windows TB to Flatpack TB using the same method you described, however it failed several times (see screen grab) for me. I got there in the end by a mixture of copying parts of the backed up profile to the newly created profile folder and using the TB import tool in stages, however I tried so many things I lost track, so will hopefully get around to documenting the process.

I'm intrigued by Flatseal, sounds like some further learning needed on my behalf.

Cheers

1 Like

Flatseal is a Program to manage Permissions for Flatpaks. You can set it up for an individual Program or for all installed Flatpaks. You can find it in the Software Store.

I think that's my fault; I promised I would talk more about this whole thing but I got distracted with other things... Let's see if I can make it brief but informative:

Debian and any distribution derived from it, such as Ubuntu and by extension Zorin OS, uses the so-called Debian package format. This "package" is basically an archive, like a zip file, that includes the executable itself along with some metadata and various auxiliary files to help with housekeeping. Part of that metadata is a list of dependencies, meaning other software that must be already installed in the system. If you try to install something like Thunderbird, it will look at your system to check if you have all the dependencies that it needs to run properly, and it will install whichever ones are missing.

Where does Debian install things like Thunderbird or whatever dependencies it needs? From so-called software repositories, which you can think of as being like the Google Play Store for Android. It's a place where software for your particular distribution exists at a particular version. For example, Thunderbird is available at version 115 in the Zorin OS 17 repositories, while Debian 12 has the version 128.

So, how come that neither of them have the latest 138? Well, Debian is designed with stability in mind and it goes through a lot of trouble to check that the available software is stable and it works properly all around. Once everything is tested properly and is ready for release, the software repositories are frozen so that whatever versions are available at the time of release stay that way. This doesn't mean that there aren't any updates; security updates are still applied, but application versions are not updated so frequently due to the risk of introducing bugs or conflicts with existing software.

This is where other package formats come in. Flatpaks and Snaps work in a very similar way to what I just described, but these formats have their own set of libraries that only they can access, called a "runtimes". This solves the problem of potentially introducing conflicts with important system libraries and this allows you to install whichever version of Thunderbird you want (usually the latest one). If a new version of Thunderbird is releases tomorrow and it needs different libraries, a new runtime is installed.

Additionally, Flatpaks create an environment around the application to prevent it from reading files from the rest of the system. This is similar to how mobile apps work in Android for example, where you need to assign them permissions for things like using the camera or whatever. Flatseal is dedicated program that you can install to manage Flatpak's permissions.

And that's what happened here. You installed Thunderbird as a Flatpak and that created its own profile directory. The imports probably failed because of lack of permissions. You then installed the Debian package, which you naturally thought would be able to read the profile you just took the time to set up, but because of the isolation layer it thought this was a fresh installation.
The trick with the symbolic links is just a hack around this limitations: smoke and mirrors, nothing more. Obviously, not a good solution long term, and also an important point to bring up which is try to not mix and match different formats.

Personally, I prefer and recommend Debian packages whenever possible. They are much more efficient and less prone to cause issues of any kind. And especially for people new to Linux this type of thing can create a lot of friction and frustration, as we've seen many times in the forum.
I very much rather have someone complain about an outdated, but functional, version of Thunderbird than complain about hours of wasted time trying to get it to work.

Another downside about Flatpaks is that they tend to duplicate a lot of those system libraries and they take a lot more space. For example, here's an old screenshot where you can see there are three runtimes installed at the same time (the GNOME Application Platform versions 43, 44 and 45):

And the size difference:

So, just like with everything else, it's all about pros and cons. The drive space might not be a big deal but if you have a smaller laptop for travelling, like I do with a 32GB Chromebook, Flatpaks are not the best option for me. Or, if I need to install something quickly, downloading an entire runtime on a slow connection can be very panful:

An interesting thread about this whole discussion:

Ok, now it's my turn to go to the sauna :smiley:

3 Likes

Thank you @zenzen for the explanation, much clearer and more succinct than I would have managed.

The only thing I would add in this particular case of Thunderbird is that, on my machine at least, this later, Flatpack version seems to run much better than the native version. And, I was very glad to have the visual and functional similarity to the Windows version, as I still use that on my main Win10 work machine, so I didn't want different layouts between environments.

@LeaUK I am glad you got there, and puzzled by the import fail. As I say, I have imported between various installations on multiple occasions and never experienced any issue. Maybe its luck!

2 Likes

Probably due to my 10 years+ email database :rofl: Next time I'm going to simply export/import the settings only and set IMAP to recover only the last couple of years, I've also only 64GB storage which isn't ideal that's for sure and my mail is taking 20GB!

2 Likes