pklaus / docker-phoebus

Docker image for CS-Studio Phoebus
https://hub.docker.com/r/pklaus/phoebus
2 stars 1 forks source link

need help. #1

Open rgowdru opened 2 years ago

rgowdru commented 2 years ago

Hello, I am a student at mainz-uni working at HIM. I am trying to runt this to understand how phoebus works in a container. But I am getting the following erro.

2021-10-14 15:18:35 INFO [org.phoebus.product.Launcher] Phoebus (PID 1) 2021-10-14 15:18:36 WARNING [javafx] Unsupported JavaFX configuration: classes were loaded from 'unnamed module @1b199296' No protocol specified No protocol specified Exception in thread "main" java.lang.UnsupportedOperationException: Unable to open DISPLAY at com.sun.glass.ui.gtk.GtkApplication.lambda$new$6(GtkApplication.java:173) at java.base/java.security.AccessController.doPrivileged(Native Method) at com.sun.glass.ui.gtk.GtkApplication.(GtkApplication.java:171) at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41) at com.sun.glass.ui.Application.run(Application.java:144) at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:280) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:288) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:160) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195) at java.base/java.lang.Thread.run(Thread.java:829)

Thank you. Ravi.

pklaus commented 2 years ago

Hi Ravi! The problem is that the application in the container wants to open the GUI, but it cannot connect to the $DISPLAY (X server). That's indicated by the line

Exception in thread "main" java.lang.UnsupportedOperationException: Unable to open DISPLAY

Typically Docker containers run headless processes that cannot connect to your display / X server. You need to allow that explicitly and an example how to do that is given in the section "Running the GUI on the host's X11 Server " in the README.

I was also successful running the container with x11docker, which is an elaborate Bash shell script to wrap the docker run command for GUI access.

Another possibility is to start phoebus alongside another container that provides the X-Server. Or a noVNC container that allows to connect to the GUI via a browser.

@Mrcl3 might also be able to provide some guidance on how to run Phoebus inside containers.