[flatpak] File Chooser dialog starts in /run/user/...
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
People
(Reporter: from_bugzilla3, Assigned: jhorak)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Steps to reproduce:
- Save something using Ctrl+S
- Save something else using Ctrl+S
Actual results:
The file chooser keeps using /run/user/<UID>/...
as the remembered path
Expected results:
If the last used directory is inside $XDG_RUNTIME_DIR
, let the XDG portal host choose where to start the picker, rather than asking for something that works out to be worse than doing nothing.
Reporter | ||
Comment 1•3 years ago
|
||
Oh, as an example of how this affects me. Suppose I'm trying to download some game assets on Itch.io.
That works out to:
- Open a file manager window to the folder I want to save to, so its address bar can be there to copy-paste from
- Click a download button (same as in non-Flatpak releases)
- Copy-paste the desired folder path from the file manager into the picker and hit Enter. (...and I'm on Kubuntu 20.04 LTS. I've never figured out how to interact with the GTK/GNOME file picker's Ctrl+L address bar mode without it misbehaving.)
- Click Save (same as in non-Flatpak release)
- Repeat steps 1 through 3 for each file
That's 50% more steps (and it feels like more) for each download, plus an additional step amortized across all of them.
Comment 2•3 years ago
|
||
Setting a component for this issue in order to get the dev team involved.
If you feel it's an incorrect one please feel free to change it to a more appropriate one.
Comment 3•3 years ago
|
||
Up until recently, Firefox downloads would start in /var/downloads and then let me choose the appropriate subdirectory (abc, def, ghi, jkl, ...) and then I could choose the site-specific directory under that one. Even better, FF would even remember site-specific downloads and prompt for the specific directory, e.g. /var/downloads/tuv/ubuntu, every time I downloaded from ubuntu. That was great! That was really useful!
Now, FF downloads start in the completely inappropriate /run/user/... Why isn't the previous methodology still supported, or even an option? God only knows why it was changed, and it does not appear useful.
Please provide a way for us to use the previous directory structure, because I have internal support structure built around it.
At the very least, explain why it was changed and why somebody thought it was useful, preferably at the place in settings where I can choose where I want downloads to be saved. Without the explanation, it just seems arbitrary and that any decision made can't be expected to be lasting (like bookmarks, which I gave up on a decade ago) and shouldn't be counted upon.
Reporter | ||
Comment 4•3 years ago
|
||
(In reply to Steve Kelem from comment #3)
Basically, it's a shortcoming in the XDG portal host that Firefox triggers in its attempt to implement things like remembering site-specific download directories. When dealing with directories outside the sandbox, Firefox never sees the actual paths and the portal neglects to translate the /run/user/...
paths back to real paths when an application requests that the dialog start opened to a previous path.
In my experience...
- Other sandboxed applications don't trigger this because they don't implement things like site-specific download memory.
- I'm not sure about now but, previously, Firefox's Flatpak manifest granted full access to your home directory (essentially disabling that part of the sandbox), preventing it from indirecting through
/run/user/...
and, thus, avoiding the bug.
You should be able to work around it by installing Flatseal and poking permanent holes in the sandbox using Filesystem > Other files for your site-specific downloads folders. In my experience, doing that to regain support for saving foo.html
and foo_files
when only foo.html
had been chosen in the picker also restored normal function for site-specific download directory memory.
Assignee | ||
Updated•3 years ago
|
Comment 5•2 years ago
|
||
So, how do I install flatseal? I have flatpak installed. apt-get install flatseal says it can't locate package flatseal.
Reporter | ||
Comment 6•2 years ago
|
||
(In reply to Steve Kelem from comment #5)
So, how do I install flatseal? I have flatpak installed. apt-get install flatseal says it can't locate package flatseal.
flatpak install flathub com.github.tchx84.Flatseal
as given at https://flathub.org/apps/details/com.github.tchx84.Flatseal
Updated•2 years ago
|
Description
•