13

Not long ago (a few months at most), Firefox on Ubuntu 22.04 was able to open files in /tmp, using a file:///tmp/xxx link. Now these links show the files as unavailable.

When I try to use a file:/// link, the root dir is unrecognizable (and contains a README.md that I can't open from Firefox), and file:///tmp is also unrecognizable.

xdg-open file:/// shows the results I expect.

I've been using this for go tool cover, which no longer works because it creates a file in /tmp that the browser can't see.

Here are the contents of file:///, which might provide a clue.

README.md   1 KB     4/8/24     03:51:43 EDT
bin                  4/8/24     03:53:39 EDT
boot                 4/8/24     03:53:39 EDT
copyright   2 KB     4/8/24     03:51:43 EDT
dev                  7/4/24     13:52:01 EDT
etc                  7/4/24     13:52:06 EDT
home                 3/7/24     20:53:14 EST
host                 4/8/24     03:53:23 EDT
lib                  4/8/24     03:53:39 EDT
lib32                4/8/24     03:53:40 EDT
lib64                4/8/24     03:53:40 EDT
libx32               4/8/24     00:53:48 EDT
media                3/8/24     08:09:23 EST
meta                 4/8/24     03:53:40 EDT
mnt                  2/20/24    14:22:09 EST
opt                  4/8/24     00:53:49 EDT
proc                 7/4/24     09:48:40 EDT
root                 4/22/24    09:43:01 EDT
run                  7/4/24     13:24:58 EDT
sbin                 4/8/24     03:53:40 EDT
snap                 7/4/24     13:51:59 EDT
srv                  4/8/24     00:53:49 EDT
sys                  7/4/24     09:48:40 EDT
tmp                  7/4/24     14:15:56 EDT
usr                  4/8/24     03:53:27 EDT
var                  4/8/24     03:53:40 EDT
writable             4/8/24     03:53:23 EDT

I can't find a directory with these files anywhere on my system.

Why is this happening, and how can I fix it?

0

1 Answer 1

41

Ubuntu has switched Firefox from being a traditional package to being a Snap package – imagine it as a Docker container but for desktop apps. The container has a virtualized file system with its own / (and therefore its own /tmp and everything else), only with /home mounted from the outer namespace.

To 'fix' it, find a way to install Firefox not through Snap – e.g. using the Mozilla .deb packages from their PPA repository (use the apt-preferences file if needed to prioritize the PPAs over the bad Ubuntu package), or by extracting the Mozilla-provided .tar.gz into ~/.local or wherever (it will auto-update like on Windows).

5
  • 1
    Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on Meta Super User, or in Super User Chat. Comments continuing discussion may be removed.
    – DavidPostill
    Commented Jul 5 at 17:11
  • Or, switch to a more normal Linux distribution. Commented Jul 7 at 16:34
  • I consider Ubuntu to be a "normal" Linux distribution. Commented Jul 8 at 11:49
  • I just posted what might be a similar (or identical) issue here. Is the only way to fix the problem to remove the SNAP and installing the PPA ? Commented Jul 16 at 23:58
  • Another workaround is to use TMPDIR: TMPDIR=$HOME/tmp go tool cover ... Commented Jul 22 at 12:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .