Opening processor manual fails on Ubuntu 22.04 w/default snap installed Firefox due to snap sandboxing
See original GitHub issueDescribe the bug On Ubuntu 22.04, using the default snap based Firefox install, opening processor manuals via CodeBrowser Listing’s right-click menu fails.
Firefox opens but displays the following error:
Firefox can’t find the file at /tmp/pdfView12297125562363118529.html.
Check the file name for capitalization or other typing errors.
Check to see if the file was moved, renamed or deleted.
The HTML file is being created as expected in /tmp. However due to the way snap applications are sandboxed Firefox can’t open it from that file path. On Ubuntu 22.04 Firefox maintains it’s own separate tmp directory under the user’s homedir at ~/Downloads/firefox.tmp because that’s a path snap sandboxing is permitted to access.
I realize this is less of a Ghidra issue and more of a snap / Firefox making breaking changes issue but I thought it was worth raising here for visibility. If you disagree feel free to close.
To Reproduce Steps to reproduce the behavior:
- Install Ubuntu 22.04
- Install Ghidra
- Download and any processor manual PDF and move it to the correct directory under Ghidra/Processors/processor_name/data/manuals/
- Import a binary of the same architecture as the manual into Ghidra and open it in the CodeBrowser
- In the CodeBrowser’s Listing view right-click anywhere and select Processor Manual…
Expected behavior Listing View > right-click > Processor Manual… should successfully open available processor manual when using a browser installed from a snap
Screenshots
Environment (please complete the following information):
- OS: Ubuntu 22.04
- Java Version: openjdk 11.0.15
- Ghidra Version: 10.1.3
- Ghidra Origin: official ghidra-sre.org distro
Additional context
snapd bug discussing no access to /tmp files https://bugs.launchpad.net/snapd/+bug/1972762
Firefox bug discussing the firefox.tmp dir in home dir https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1958813
Issue Analytics
- State:
- Created a year ago
- Comments:5
I just discovered the Edit > Tool Options > Processor Manuals options. And specifically the File Format option in there.
Setting File Format to
${FILE_URL}
from the drop-down list rather than the default${HTTP_URL}
resolves this issue for me.With
${FILE_URL}
I can successfully open the manuals from the Listing View’s right-click menu.Note however that I do have Ghidra installed in a subdir of my user’s homedir so the processor manual files themselves are also under my homedir with the Ghidra install. If my Ghidra install were external to my homedir (along with the manual files) I suspect I’d still hit the snap file access sandboxing even with this option set to
${FILE_URL}
Thanks for the workaround info. We are going to consider this a firefox issue and close it. It shall continue to serve as a valuable reference though.