Firefox snap can't open html files outside of /home
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
People
(Reporter: thomasnak, Assigned: gerard-majax)
References
(Blocks 1 open bug, )
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0
Steps to reproduce:
Kubuntu 22.04, using the default Firefox snap installation, set as the default browser.
Try using the "help" functionality in, for example, Gimp (or any other program that uses a html help file stored in /usr/share), with Firefox set as the default browser.
Actual results:
The following error message appears: Firefox can’t find the file at /usr/share/gimp/2.0/help/en/index.html
The file is there, but Firefox can't find it. Presumably due to snappy sandboxing behaviour, Firefox seems to be unable to access any file outside of /home.
Expected results:
It should be able to display these help files.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
|
||
I can confirm that uninstalling the Firefox snap then installing as --devmode (disabling FS sandbox) helps. I'm wondering how much we can help there.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 3•4 years ago
|
||
Oh, gimp places its docs in /usr/share/gimp and the system-package-doc grants access to /usr/share/doc.
Obviously, we could grant specific access via system-files but this might be a can of worm.
Olivier, how should that kind of usecase be handled ?
| Assignee | ||
Comment 4•4 years ago
|
||
cups also seems to install its doc in /usr/share/cups/doc-root
Comment 5•4 years ago
|
||
This would require an update to the system-packages-doc interface, similar to https://github.com/snapcore/snapd/pull/11588. But this is indeed opening a can of worms, and I'm not sure the snapd team would be happy with this approach. It's worth discussing in any case, and a good way to initiate the discussion is to open a PR.
Note that there is a currently open PR to broaden the set of doc packages that the interface will allow reading (https://github.com/snapcore/snapd/pull/11699), but it wouldn't help in this specific case.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 6•4 years ago
|
||
PR has been r+, so now it's probably just a matter of:
- CLA signing
- green tests
- merging
I'll mark the bug as RESOLVED:FIXED when it is merged.
Thank you for getting on this so quickly!
There are probably a lot more of these, though. A more minor example I ran into recently is Simon Tatham's Portable Puzzle Collection. These puzzle games all have help files located in usr/share/sgt-puzzles/help/ (at least, when installed from the default Ubuntu repo's), which means these help files don't work on a Ubuntu 22.04 installation with Firefox Snap as the default browser. Is some sort of more general solution unfeasible?
| Assignee | ||
Comment 8•4 years ago
|
||
(In reply to thomasnak from comment #7)
Thank you for getting on this so quickly!
There are probably a lot more of these, though. A more minor example I ran into recently is Simon Tatham's Portable Puzzle Collection. These puzzle games all have help files located in usr/share/sgt-puzzles/help/ (at least, when installed from the default Ubuntu repo's), which means these help files don't work on a Ubuntu 22.04 installation with Firefox Snap as the default browser. Is some sort of more general solution unfeasible?
That's something outside of my scope, unfortunately, you need to take that to either snapd / ubuntu packagers
| Assignee | ||
Comment 9•4 years ago
|
||
This specific issue is fixed upstream
Description
•