Restore firefox saving downloads to /tmp

Viewed 39

As the result of upgrading to the 22.04 LTS, the behavior of ff's downloading has changed. I've read a few posts about this, but haven't seen anything relevant to solving my problem. Specifically, I want ff to download all files to /tmp/. In the Settings tab using the Browse method, I select /tmp/, but it the setting then shows /run/user/1000/doc/fa9c1cc2/tmp⁩. If I try using this set up, the downloads fail. If I use ~/Downloads, it works, but that's not what I want.

Can someone tell me how to ff to download files to /tmp/? Below is a screen shot of my about:config settings: screenshot of advanced settings

1 Answers

There seems to be no "good" way to do this; this is a moderately fundamental limitation of snaps, and firefox has been repackaged as a snap in Jammy. However, two hack solutions from https://askubuntu.com/questions/1263843/how-to-allow-snap-applications-to-access-tmp-folder are:

  1. Bind-mount your tmp folder into your home directory:
mkdir /home/you/.tmp
sudo mount --bind /tmp /home/you/.tmp/

(can be made permanent via fstab)

  1. Auto-clear your downloads folder on startup: sudo crontab -e followed by adding @reboot rm -rf /home/you/downloads/* to the crontab.

Both of these solutions entail having an extra directory in your home folder :( It seems this is the design trend being followed by Ubuntu with the move to snaps and Wayland, trying to confine things and bring more security guarantees at the cost of flexibility. Such is life!

Related