From 95bc4e63856a938b71d99df9a2842e7658e24014 Mon Sep 17 00:00:00 2001 From: Sangbaek Lee Date: Sat, 21 Jun 2025 10:46:00 -0400 Subject: [PATCH] Update README.md: Add --web=off for graphics ## Trouble My machine prints out the following message when I executed the suggested command, `docker run -it -v ${PWD}:/home/${USERNAME} -e DISPLAY=host.docker.internal:0 rootproject/root:latest root`, under `Enabling Graphics` at [README.md](https://github.com/root-project/root-docker/blob/master/README.md): ``` Find more info on https://root.cern/for_developers/root7/#rbrowser Info in : Starting HTTP server on port 127.0.0.1:9642 ROOT web-based widget started in the session where DISPLAY set to host.docker.internal:0 Means web browser will be displayed on remote X11 server which is usually very inefficient One can start ROOT session in server mode like "root -b --web=server:8877" and forward http port to display node Or one can use rootssh script to configure port forwarding and display web widgets automatically Find more info on https://root.cern/for_developers/root7/#rbrowser This message can be disabled by setting "WebGui.CheckRemoteDisplay: no" in .rootrc file sh: 1: xdg-open: not found ``` ## Solution This can be solved by updating the `root` with `bash -c 'root -l --web=off'. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 46673f0..0a59af6 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ The `-v` option tells Docker to mount the home directory (`~`) to `/userhome` in To use graphics, make sure you are in an X11 session and run the following command: ``` -docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --rm -it --user $(id -u) rootproject/root root +docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --rm -it --user $(id -u) rootproject/root bash -c 'root -l --web=off' ``` On some platforms (e.g., Arch Linux) connections to the X server must be allowed explicitly by executing `xhost local:root` or an equivalent command (see e.g. [this page](https://wiki.archlinux.org/index.php/Xhost) for more information on `xhost` and its possible security implications). @@ -83,7 +83,7 @@ xhost + $ip ``` This will start XQuartz and whitelist your local IP address. Finally, you can start up ROOT with the following command: ``` -docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$ip:0 rootproject/root root +docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$ip:0 rootproject/root bash -c 'root -l --web=off' ``` ##### Windows