Closed HealthyPear closed 3 years ago
Hi,
do you start the container with docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$ip:0 rootproject/root
? If yes, what does gROOT->IsBatch()
return when called at the ROOT prompt?
Yes, I am in batch mode (in fact .demo
doesn't work)
Is there some default -b
when launching root from a docker container?
Ah yes, it seems so:
line 29 of the ubunut DockerFile (the distro associated with my container seems to be ubuntu)
CMD ["root", "-b"]
How can I disable batch mode?
Solved it:
just add the command root
at the end of the docker run
command to override the CMD
key in the DockerFile.
Could be good to add this to the instructions maybe?
Yes, we have root -b
as default command because we can't assume an X11 server is present (e.g. in CI jobs) but we should definitely point it out in the docs (PRs are welcome, otherwise I'll just leave this open as a reminder).
Sure, I can do it.
Is the README the only place to add this modification? I guess the documentation shown on hub.docker is just the README itself?
yep, just the README. Thank you very much, much appreciated!
hello, this doesn't work for me either. i am giving root as explicit CMD but it still comes up in batch mode?
root [0] TBrowser b
Warning in
if i docker run into a bash shell and start root explicitly, i even get this:
root [0] gROOT->IsBatch()
(bool) false
root [1] TBrowser b
Warning in
Hi @gbrandt1, I can indeed reproduce your issue, I'll take a look into it and will get back to you ASAP.
Hi @gbrandt1, after checking it again, I realised it has been intended for a while to only have the batch option allowed in our Docker images (the documentation is outdated, I will fix it now). Therefore, it will not be possible to use the graphics. If you want to use the graphics, please use other ROOT installation methods: https://root.cern/install/.
it should be possible to use graphics with these docker images, if it's not it was an unintended regression (if it happened on my watch :) )
Hi, Thanks for the responses. Indeed I thought it is a bit unusual and antiquated to pass the X11 domain socket into the container to have graphics. The ROOT team may want to consider using a more modern solution like KasmVNC. For example there are many "legacy" applications that can provide their GUI in a broswer based on a baseimage like this:
https://github.com/linuxserver/docker-baseimage-kasmvnc
Kind Regards
Hi again @gbrandt1 and @eguiraud,
I believe I made a mistake while trying to reproduce the issue and got confused by another batch mode discussion I had with some colleagues the other day. Now I followed the instructions from "enabling graphics" section once again both on mac and linux machines (ubuntu 22) and it all works fine for me.
So could you @gbrandt1 provide a bit more context? What OS are you using?
Cheers, Marta
Hi @martamaja10 I was using a Linux box with a natively installed ubuntu 20.04
System information
OS: macos 10.15.7 XQuartz: 2.7.11 (xorg-server 1.18.4) docker: installed with
brew cask
, output of--version
isDocker version 20.10.0, build 7287ab3
Steps followed
docker run -it rootproject/root
Outcome
After this, I get no GUI window showing an empty TBrowser.