dockerfiles icon indicating copy to clipboard operation
dockerfiles copied to clipboard

X window issues

Open sharkwsk opened this issue 8 years ago • 9 comments

Hi,

I have docker on Ubuntu 16.04

I have a bash script that is hosted on a docker container on alpine. This script should start a java GUI When I run docker run, I still get errors related to X server. I have followed several forum recommendations with no luck. Anyone has any hints

docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --name javaapp javaapp testing JVM in /usr/lib/jvm/java-1.8-openjdk/jre ... Starting Installer ... java.lang.reflect.InvocationTargetException Continuing ... java.lang.IllegalStateException: The outer element does not return value Continuing ... Could not display the GUI. This application needs access to an X Server.


You can also run this application in console mode without access to an X server by passing the argument -c


sharkwsk avatar Dec 13 '17 05:12 sharkwsk

I build my app using docker run -it javaapp .

Docker file is attached Dockerfile.txt

sharkwsk avatar Dec 13 '17 05:12 sharkwsk

Hi @sharkwsk , did you try running xhost + before starting the container?

koep avatar Dec 13 '17 07:12 koep

Yes, did that. No luck :(

sharkwsk avatar Dec 13 '17 07:12 sharkwsk

Anyone has any hints ?

sharkwsk avatar Dec 14 '17 05:12 sharkwsk

hi @sharkwsk. have you tried using a diferent user?

redromraz avatar Dec 14 '17 06:12 redromraz

@sharkwsk can you provide javaapp.sh? we can't reproduce your image without it.

koep avatar Dec 14 '17 06:12 koep

Its available here, binary embedded shell script http://external.pureload.com/download/registerDownload.jsp?prodid=96&product=PureTest&version=5.3.6&version_type=current&target_os=linux&with_jre=false&filename=puretest_unix_5_3_6.sh&type=Linux+(setup+installer)&installer=%2fproduct_download%2fpuretest-5.3.6%2fmedia%2fpuretest_unix_5_3_6.sh

sharkwsk avatar Dec 14 '17 08:12 sharkwsk

Sorry I kinda don't want to download and run this :-D

koep avatar Dec 15 '17 15:12 koep

Hi Koep,

I understand your concern.

The script is for Linux version of a tool from below website http://www.pureload.com/download/puretest/

A tool used for API testing

sharkwsk avatar Dec 17 '17 22:12 sharkwsk