GNOME Bugzilla – Bug 779311
View Source not working under Flatpak
Last modified: 2019-10-24 04:18:37 UTC
The current method used to implement view source isn't working under Flatpak 0.8 - see https://github.com/flatpak/flatpak/issues/592 We need to either see if the issue will be fixed in Flatpak, or if we'll need to work around it ourselves. Spun off from Bug 770886.
According to feedback in the Flatpak issue above, this would need some portal support at least, but the current implementation is a bit of a hack anyway. So we have some options here: 1. Hide View Source menu item if we can detect we are running in a flatpak sandbox 2. Stop using an external and integrate a viewer into Geary, either a) as a popup-window (boo!) or b) into the the conversation view (yay!) 3. Save the file to the XDG Downloads dir and open the file in an external app from there (3) is the closest to current functionality, but sucks because it will leave view source files littered around people's downloads folder. (1) and (2a) are both quick fixes but (2a) is probably preferable. (2b) is probably the best option, but a lot of work.
Maybe go with (1) for 0.12.1 and either (2a) or (2b) for 0.13?
There's maybe also (4) Adding `--filesystem=/tmp` to the Flatpak Manifest. The privacy implications of storing mail in /tmp aside, this is what we do already, so might as well keep the same functionality for 0.12?
Oh yeah, good call! Workaround pushed to as commit 919e4b9. It's still a bit suboptimal, since it now presents the weird-looking portal app-chooser UI rather than just opening it, but at least the feature is back. Will keep this open for now.
The weird-looking portal app-chooser UI appears also every time you open any attachment.
Bump tickets to 0.14 that aren't going to make 0.13.
Closing this in favour of https://gitlab.gnome.org/GNOME/geary/issues/453