Announcement

Collapse
No announcement yet.

Thunderbird Snap on Local Network

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Thunderbird Snap on Local Network

    I am rapidly getting over snap but it looks like we are stuck with it.

    Thunderbird is my mail client and I use a network server to store and access mail via my local network. Amongst other frustrating faults for which the seems to be no resolution, Thunderbird creates folders in /run/user/1000/doc and /run/user/1000/doc/by-app when accessing the share to deal with emails. Most of these folders are empty with names like 79f0b375. They build up and appear useless. I am unable to delete them even using sudo rmdir.

    How do I get rid of them and stop them being created?

    Thanks.

    #2
    (I use the thunderbird download with gmail, but I don't get /run entries for it. I do get them for Chromium, which is from flathub.)

    /run isn't a real filesystem, and presents data about running daemons and the like. I imagine that the "share" is samba or NFS, and the /run entries come from their daemons.

    /run is cleared out, or rather disappears, on shutdown. Why worry about it? I suppose it might be a symptom of some subsystem's daemons proliferating unnecessarily, in which case the proliferating daemons is the problem, not the /run entries.
    Regards, John Little

    Comment


      #3
      Thanks for the response John, it's appreciated.
      The share is NFS.
      I don't understand how /run can disappear on shutdown when it is taking up 45Gb of space and appears exactly the same on startup? Nearly all the space is being consumed by the /run/user/1000/doc directory which contains these folders which I cannot delete? That much disc space is a worry.
      It would seem to me that snap may copy the data from the server to the local machine, then perhaps saves changes back either when it is changed or on shutdown. The data on the server is certainly updated as it is current when accessed from another non-snap version of Thunderbird on another computer. I'm not sure of how or why this operates in this manner?
      Last edited by waverider; Nov 30, 2024, 12:07 AM.

      Comment


        #4
        ...when it is taking up 45Gb of space...
        It isn't a real file system; no space is taken up in storage, like /proc and /sys. The entries may be maps in to the 64 bit virtual address space, but I don't think one can say how the entries are used.

        45 GB seems excessive, though. I have de-snapped (begrudging the real storage the snap subsystem took, and how it bloated my backups) and /run shows as 5.2 MB. I wonder what other users that have snaps see in /run.
        Regards, John Little

        Comment


          #5
          5.2M on my Desktop PC (Kubuntu 24.04).
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Thanks for the responses. I am now totally confused. If no space is taken up in storage why do i only have 5Gb left on a 112Gb hard drive with /run showing 45Gb?
            Some further explanation:

            When I enter the Local Directory path to the remote server into Thunderbird​:
            /media/netserver/Mozilla/Thunderbird/Profiles/8i6rf48w.default/Mail/mail.mydomain.com
            it then converts this path to:
            /run/user/1000/doc/1d6856f4/mail.mydomain.com
            It then copies all the files from the server (11.3Gb) to two folders:
            /run/user/1000/doc/1d6856f4/mail.mydomain.com
            and
            /run/user/1000/doc/by-app/snap.thunderbird/1d6856f4/mail.mydomain.com

            This of course now totals 22.6Gb

            The excess folders in /run/user/1000/doc/1d6856f4/mail.mydomain.com and /run/user/1000/doc/by-app/snap.thunderbird/1d6856f4/mail.mydomain.com cannot have permissions altered or be deleted by sudo but are taking up another 22Gb of space.

            How can I remove them to free up space and why is this happening?
            Last edited by waverider; Dec 01, 2024, 12:45 AM.

            Comment


              #7
              Originally posted by waverider View Post
              why do i only have 5Gb left on a 112Gb hard drive with /run showing 45Gb?
              Well, I've looked deeper, and not all of the filesystems in /run are tmpfs. /run/user/1000/doc is a portal. What that is and how it is uses space I find a mystery.

              When I installed thunderbird (some years ago) it installed with the account setting "Synchronize all messages locally regardless of age" checked. I've got dozens of GB in gmail going back to when gmail started, so this was a huge nuisance. kmail did the same. I was advised to set up thunderbird, then as soon as possible go in and uncheck the synchronize setting to stop the downloading. Perhaps you have a similar thing going on, complicated by the snap subsystem?

              I suspect that with 112 GB drive, using snaps may not be good, especially if you have more than a few GB of user data. I'm using the thunderbird installed from the download, installed to /opt, somewhat like how it installs from a download in Windows, and I've found it works really well, even though I have to use its own update mechanism. Its use of space is understandable for me; the data are in the profile directory. In this forum there are guides and scripts on how to de-snap.
              Regards, John Little

              Comment


                #8

                The deeper I probe the more confusing it gets. I tried de-snapping but Kubuntu only provides TB 115 in the repository and it had difficulty reading the files saved by TB 128. I have no idea why as they can be read by other computers still using Kubuntu 22.04 and TB 115. Also tried Flatpack but the problems were exactly the same as Snap. It seems they use the same sandboxing. I certainly regret having upgraded to 24.04 and won't do it with other machines at this time until this issue is sorted. It appears that the portal is associated with samdboxing.

                More investigation shows that the following is occuring:

                On the first boot of the day without Thunderbird activated, Snap creates the following folders and files:

                file:///run/user/1000/doc/bb68f19 11.3Gb
                and
                file:///run/user/1000/doc/by-app/snap.thunderbird/bb68f19 11.3Gb

                The folder /bb68f19 has a new name each day but contains all the mail files from my server. When I start Thunderbird it cannot find this folder and mail is not displayed. The folders 1d6856f4 and a50db74c exist among many others but contain no data.

                I then reboot the computer. After reboot bb68f19 is empty:

                file:///run/user/1000/doc/by-app/snap.thunderbird/1d6856f4 11.3Gb
                file:///run/user/1000/doc/by-app/snap.thunderbird/a50db74c 11.6Gb
                and
                file:///run/user/1000/doc/1d6856f4 11.3Gb
                file:///run/user/1000/doc/a50db74c 11.6Gb

                Starting thunderbird it finds the files in /1d6856f4 and displays and operates on all mail correctly.

                I can reboot the computer many times in the same day and the files are always there but the next day the same process again - a new folder with a new name is created each time. Of course I end up with lots of empty folders which i cannot delete.

                It would appear that somewhere in the sandboxing, data info is stored which is accessed after the second boot but I have no idea where, how to correct it or remove the unwanted files and data. Also why are there two full copies of all the data under /doc?

                All too hard for an octogenarian, and impossible I would think for a user new to linux.​

                Comment


                  #9
                  Originally posted by waverider View Post
                  Kubuntu only provides TB 115 in the repository
                  Actually, Mozilla are the ones who run the PPA - they have decided to not provide upgrades from 115 at the moment
                  https://www.thunderbird.net/en-US/th.../releasenotes/

                  But if one grabs the standalone binary as opposed to using native debs, you will be able to use 128. The standalone binary will update itself, iirc, much like it does on Windows.

                  This is a simple extract-and-click sort of thing, no installer needed.
                  But there is a way to automate this as well as adding menu entries

                  https://www.kubuntuforums.net/forum/...al-thunderbird

                  and for Firefox as well, if desired.

                  https://gitlab.com/scripts94/kubuntu...tional-firefox


                  Originally posted by waverider View Post
                  The share is NFS.
                  Are you mounting this via your /etc/fstab, or using the Network option in Dolphin's sidebar (auto-discovery and auto-mount?)
                  I wonder if perhaps some of the oddness might be from using the latter, which is another "virtual file system" thrown into the layers of Linux confusions? My NAS is still in 'Murrica, so I can't easily test this out, to satiate my curiosity.

                  Comment


                    #10
                    Thanks for the help claydoh.
                    I am mounting via /etc/fstab
                    Everything worked fine up until the upgrade.
                    I will try the binary as a last resort but if Kubuntu is committed to Snap a problem like this really needs to be resolved for the longer term users. Surely there is some solution.

                    Comment


                      #11
                      Originally posted by waverider View Post
                      I will try the binary as a last resort but if Kubuntu is committed to Snap a problem like this really needs to be resolved for the longer term users. Surely there is some solution.
                      Replacing snap stuff with non-snap stuff is the only option if one does not like Snap
                      Kubuntu IS Ubuntu, so will be using it for the same things they do.

                      Otherwise, I am not sure what the actual issue is, tbh. What exactly is being shared? The destination for the locally stored email archive? the Mozilla profile directory?

                      The space thing you see is a red herring. I highly doubt it is copying 12Gb of files (twice), you would notice this every time you booted and launched Tbird, even if you have a very fast local network.

                      Use tools such as filelight to help verify your true drive space usage.
                      Note that this tool correctly leaves out the virtual directories such as /run, /proc, /dev, etc.
                      (/var/run/ is just a symlink to /run)

                      Yes, it IS confusing, and I am stumped by this stuff almost daily, even after 20 years of desktop usage. Some of it are the old legacy Unix concepts. Then they change and add new confusions just to keep it interesting.

                      This one is a mix of old/normal (/run) and the new-ish (snap/flatpak/sandboxing)

                      Comment


                        #12
                        Thanks again claydoh,
                        I decided to have another try with non-snap Thunderbird and used the script from the link you suggested. This installed Thunderbird 133 which is apparently not yet released, not 128 . It seems to work fine. I made the local directory my NAS files and it now works perfectly - no need to reboot each day.
                        I am sharing the mail files in the profile stored on the NAS so that I can access mail including archives from desktop or laptop wherever I am on the local network.

                        Really these issues should be sorted if Thunderbird is to be installed as Snap. The binary is fine for now but down the track. At my age probably won't worry me though :-)

                        With the large number of resources now relying on Snap I can't see myself completely de-snapping but at least I now know there are reliable options where needed. Filelight is a useful tool - thanks.

                        It is still strange that on my second boot of the day Discover showed my SSD red-lined for limited space when it didn't on the first boot - because of the extra 22Gb used in the /run directory. All good now though other than the fact that i still can't delete those directories from the /run/user/1000/doc directory because Snap still exists, even though those files supposedly don't and Thunderbird Snap is gone?

                        A lot has changed since Mandrake Linux in 1998. :-)
                        Last edited by waverider; Dec 03, 2024, 03:47 PM.

                        Comment

                        Working...
                        X