qBittorrent snap and FireFox links - /tmp folder issue

Perhaps directed to @arnatious, the “maintainer” of the qbittorrent-arnatious…

Installation process of https://snapcraft.io/qbittorrent-arnatious was successful. With some tweaking in PCManFM-Qt’s file properties, .torrent files are properly associated with the snap, and the snap launches automatically and prompts to process it.

The problem lies when a (non-snap, direct installed) FireFox link is clicked, it fetches the .torrent file and places it in the /tmp/mozilla_ubuntu0/ folder, and tries to launch qBittorrent. The launch is successful, but the qbittorrent app displays the following message, which I interpret it as a failure to read the contents of the /tmp folder:

Failed to load the torrent: /tmp/mozilla_ubuntu0/.torrent. Error: No such file or directory

When I manually navigate to that folder, the file is indeed there.

Being able to click on a .torrent file link is extremely useful… Any way to grant this snap access to that particular folder? Any other options?

Running snap 2.54.2 snapd 2.54.2 series 16 ubuntu 21.10 kernel 5.13.0-27-generic

It’s a known limitation of snaps, they receive a different /tmp specific to their namespace.

:frowning: :frowning_face:

That is unfortunate, and a serious limitation of the snap architecture.

As a workaround, you could run firefox in an environment where $TMPDIR is set to some other place readable by all snaps, e.g. "$(xdg-user-dir DOWNLOAD)/firefox.tmp", like the firefox snap does.

This would save torrent files under ~/Downloads/firefox.tmp/, and would allow qBittorrent to open them.