root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.71k stars 1.28k forks source link

WebGUI doesn't work with snap sandboxing #16488

Open Axel-Naumann opened 1 month ago

Axel-Naumann commented 1 month ago

Check duplicate issues.

Description

Hi,

starting the webgui (new TBrowser) opens a chromium window which complains:

Your file couldn’t be accessed
It may have been moved, edited, or deleted.
ERR_FILE_NOT_FOUND

I guess this corresponds to the following process:

axel       17508    3604  4 15:51 pts/0    00:00:01     /snap/chromium/2950/usr/lib/chromium-browser/chrome --password-store --disable-features=TFLiteLanguageDetectionEnabled --window-size=1200,700 --new-window --app=file:///tmp/root_start_t9pNYd.html

Note that this is a snap package; the browser might not be allowed to access files in /tmp as per https://forum.snapcraft.io/t/can-browsers-open-local-files/3016

(I can work around this, but I thought it'd still be worthwhile to report this.)

Cheers, Axel

Reproducer

new TBrowser with web gui.

ROOT version

master

Installation method

source

Operating system

Ubuntu 24.04

Additional context

No response

linev commented 1 month ago

Hi Axel,

Can you try to add --allow-file-access-from-files to the command line? It can be done with the following entry in .rootrc file:

WebGui.ChromeInteractive: $prog $geometry --new-window  --allow-file-access-from-files --app='$url'  &